getChildren top level ignores leaf nodes and functions