Parent list items are removed if they contain no children.