[mcs] Tweak naming of nested types. Fixes #24172