In `get_page_children()`, only check `$page->ancestors` once to avoid duplicates when the function recurses. Adds an argument, `$ancestors`.

Fixes #18962.


git-svn-id: https://develop.svn.wordpress.org/trunk@30246 602fd350-edb4-49c9-b593-d223f7449a82