Modified mask handling in bob.ip.base