d2ef040bcb
The cache in moduleByClassLoader.kt contains weak references to instances of RuntimeModuleData. However, prior to this change no one else had any _strong_ reference to the corresponding RuntimeModuleData: KClassImpl depends on the ModuleDescriptor almost directly. Therefore the weak references were sometimes garbage collected and a new module was constructed for a new reflection object, which resulted in broken equality between two reflection objects. No test added because it was rather hard to come up with (and, more importantly, to support) a test case.