cherry-pick make_local_copy fix