In ContextualType's Properties property, the SingleOrDefault call will throw a "Sequence contains more than one matching element" exception when the type contains multiple indexers.
|
.SingleOrDefault(p => p.Name == property.Name && p.DeclaringType == genericType); |