Fix children filtering logic in page sidebar