Fixing IPv6 allocation with explicit IP

RM9413, RM9414, RM9419. Includes 2 new unit tests and some
cleaner boolean logic.