Fix references to ->hasChildren() and ->getChildren()