Fix php fatal error in j2.5 list pagination

PHP error is:

    PHP Fatal error:  Maximum function nesting level of '100' reached, aborting!