Correctly validate the page number of the versions menu (see #7235)