Investigate whether the
if (!type.IsReferenceType || !type.IsStatic || type.IsGenericType || !type.MightContainExtensionMethods) return;
line in NamespaceSymbol.AddExtensionContainersForType can instead use IsClassType. This came up in the PR for #78243.
Note that I don't see this cost show up in profiles, but Aleksey would like further investigation into whether this change is safe and worthwhile.