Fixed assignment of anonymous type instances to Key.