Turns out that there was a bug in Net::Netmask (version 1.9002). It only happened in the very specific case when you were constructing a netblock using the beginning and ending IP. Netmask was incorrectly assuming that if the number of IP's between the beginning and ending block was a power of 2 then it must be a valid netblock.
While it is true that all valid netblocks have a size that is a power of 2, it is not true that all netblocks with a size that is a power of 2 are valid.
I sent the author a bug report and a diff that will patch the bug. We'll see how long it takes to get updated.