fix next button in pagination disappears on certain page

[``* `#15598 ` Next button in pagination disappears on certain page``](http://www.openproject.org/work_packages/15598)
@myabc yes we do, I was just being careful around unknown codebase