Fix php fatal error in j25 list pagination

This is the error generated in J2.5 using F3.1:

     Fatal error:  Maximum function nesting level of '100' reached, aborting!