Fix method caching bug when including/prepend module A that prepends module B Fix by always adding the generated iclass to the subclasses list, otherwise the method cache for the iclass is not cleared when the method in the module is overwritten. Fixes [Bug #20716]
Related issues
Bug #20716: Different instance_method behavior in Ruby 2.7 and Ruby 3.x
merge revision(s) 6118e8a47394409b53164b60e79fadf348b97db3: [Backport #20716]