In discussion with @benjeffery we decided that TreeIndexes is a better name for the low-level structure used to keep track of how we iterate over trees than TreePosition.
In an extension to this, we'll use DescendantIndexes as the class holding the information required to efficiently iterate over descendants in an graph type way and AncestorIndexes as the class for doing the bottom-to-top traversals (adapting from #2869)