 	/// different from the node passed in), or an error if this addition would
 	/// make the graph inconsistent.
 	mutating func addNode(var node: DependencyNode, dependencyOf: DependencyNode?) -> Result<DependencyNode, CarthageError> {
-		if let index = allNodes.indexForKey(node) {
-			let existingNode = allNodes[index].0
+		if let index = allNodes.indexOf(node) {
+			let existingNode = allNodes[index]
 
 			if let newSpecifier = intersection(existingNode.versionSpecifier, node.versionSpecifier) {
 				if newSpecifier.satisfiedBy(existingNode.proposedVersion) {

				return false
			}

			for (dep, _) in leftDeps {
				if rightDeps[dep] == nil {
					return false
				}
			}

		}
	}

	for root in lhs.roots {
		if !rhs.roots.contains(root) {
			return false
		}
	}
