Fix a bug in handling prefixlengths that are not a multiple of 4.