Fix typo in tree walk code.

    Copy paste cod error. It worked, but was a bit fishy.