Prevent invalid page number. Refs #8230.