Handle subtrees with undo