Fixes page navigation giving 404 errors on page/2 and beyond when using custom permalinks like category/postname.