wiki: Remove recursion and fix wiki page list filtering.

This fixes an issue with filtering wiki pages by visibility when the number of pages is greater than NUM_AT_A_TIME. Replaced the recursion with a loop for clarity and sanity.