merge-recursive: allow write_tree_from_memory() to error out