Destructive in-order tree traversal