middle_ladder_walk(): Allow alternative near-edge termination of ladders