cherry-pick/revert: make direct internal call to merge_tree()