So that the $velocityHasNext variable will be filled with the "hasNext" of the follow-up iteration and not with the "hasNext" of the current iteration (which will always be true, otherwise the loop has finished before).