treeIndexOf, insertAtTreeIndex, findScopeParent methods