       return previouslyResolved
     }
 
-    resolvedInstances.storeResolvedInstance(resolvedInstance, forKey: key, inScope: definition.scope)
+    resolvedInstances[forKey: key, inScope: definition.scope] = resolvedInstance
 
     if let resolvable = resolvedInstance as? Resolvable {
       resolvedInstances.resolvableInstances.append(resolvable)

      DefinitionKey(protocolType: $0, argumentsType: key.argumentsType, associatedTag: key.associatedTag)
    })
    for key in [key] + keys {
      if let previouslyResolved: T = resolvedInstances.previouslyResolvedInstance(forKey: key, inScope: definition.scope) {
        return previouslyResolved
      }
    }

  var singletons = [DefinitionKey: Any]()
  var resolvableInstances = [Resolvable]()
  
  subscript(forKey key: DefinitionKey, inScope scope: ComponentScope) -> Any? {
    get {
      switch scope {
      case .Singleton, .EagerSingleton: return singletons[key]
      case .ObjectGraph: return resolvedInstances[key]
      case .Prototype: return nil
      }
    }
    set {
      switch scope {
      case .Singleton, .EagerSingleton: singletons[key] = newValue
      case .ObjectGraph: resolvedInstances[key] = newValue
      case .Prototype: break
      }
    }
  }
  
