PM / hibernate: Fix rtree_next_node() to avoid walking off list ends