I have a loop that takes a search, get's the range of 0 - 999 and loops until the result length is 0.
So the second loop will be 1000 - 1999. If there were only 4 items returned in a search, then it would exit here because the result length is 0.
In my first sandbox, this works. In my second sandbox, 4 results are returned regardless of the start and end range