[mcs] Method group caching needs to consider type arguments as well. Fixes #17059