cache parent locations while traversing children.