Only search up to the maximum y block (optimization)