[ALLI-2742] Fixed a bug in MetaLib pagination algorithm