Uh oh. I misunderstood the intent of the code.

You can see in the API docs for the method that if 'totalItems' isn't set, Paginator assumes there is always a next page. I guess this is to simulate infinite result sets.