Exception when attempting to use keyed dependencies - C#