Fix STUD-1129: handle out-of-range page numbers
Merge pull request #2098 from edx/andya/rc-pagination-fix

Fix STUD-1129: handle out-of-range page numbers