Re-entrant tree iterator

to test, run included unit test.