Fix dependency graph copy.