Filter out subtags with nodes from tree