Fix borrow and carry in IPAllocator

Replaces #1866

@lavalamp