[bal] Check if prev/next entry is actually a neighbour, and add UINTPTR_MAX checks in mmap code.