Correctly handle duplicate modules in depgraph.