MDL-44560 glossary: Fix pagination on glossary category view

Credit to Sebastian B for this fix