[mcs] Effective base class can include inherited types. Fixes #21390
[mcs] Use closed delegate over static generated methods from anonymous methods