More efficient preorder iteration