Fixes #6766 - Pagination is failing