Replaced TreeWalker with recursive node iterator.