Add a root to the DependencyGraph representation and serialization.