This loop could set best_next_hit multiple times.