Update the query builder to get the last page of results if the requested page is beyond the last page.