Optimization: do not try to load non-existent next page.
- Includes tests.