Serialize the tree, too.