See 4a533168d9 for the original change which
introduced the problem
Note that the added test case _was not failing_ before the change. It's added
because there were no tests on multi-file class behavior in light classes mode
at all. The actual repro for the problem is difficult to make a test from
#KT-12755 Fixed