The replacing method doesn't need to initialize the parent, or copy the fields down from it because the IteratorState object is shared between the parent and all subiterators that are created from it.  So we only have to initialize once, and there is no copy down from the parent.

Thus, the code is simpler, but may be a bit slower for very flat trees, but may be a bit faster for deeper trees.  Java trees are very deep, and are very likely to be processed by JGit (due to its embedding in Eclipse), so the fact that we may be a bit faster for deeper trees (due to less copying and recursing during setup of the digest and buffer) means this simpler code is probably better anyway.  :-)