I don't understand why you subtract numNodesAdded here.
How could adding nodes make the index of the this child smaller?
Would it make sense to count the number of removed nodes and subtract that?