Fix bounds checking for #has_possible_move.