Fix: safe iteration over children in onEnter