We don't need to write the metadata two times in the executer

After the tree is finalized, the metadata writing can happen. After
that, the tree cannot be changed, so there is no need to re-write the
tree again.