Refactor and set child nodes to empty for '*' nodes.