check if one tree is a subtree of another