Refactor AbstractTreeIterator.pathCompare to force another mode