             // We collect all version-based dependencies in a separate structure so they can
             // be process at the end. This allows us to override them when there is a non-version
             // based (unversioned/branch-based) constraint present in the graph.
-            let container = try getContainer(for: package)
+            let container = try provider.getContainer(for: package)
             for dependency in try container.getUnversionedDependencies() {
                 if let versionedBasedConstraint = VersionBasedConstraint(dependency) {
                     versionBasedDependencies[package, default: []].append(versionedBasedConstraint)

        return Version(major, minor, patch + 1)
    }
}

        )
    }

    /// Returns the best available version for a given term.
    func getBestAvailableVersion(for term: Term) throws -> Version? {
        assert(term.isPositive, "Expected term to be positive")
        let container = try provider.getContainer(for: term.package)

        var versionSet = term.requirement

