MDL-49231 mod_glossary: Ensure consistent order when pagination is used