Fix bug associated with source netmasks < 8 bits
Add tests for source netmasks < 8 bits