Util for finding subtrees in set of tree nodes.