Switch to using generators for the inorder traversal.