better tree reparenting (find selected node)