This is exactly the same issue than #545, it was fixed in b0856fe but in the same pull request 32a7004 caused a regression.
In the example from #545, the enclosing class is the module class Test$ and the top class is also the module class Test$, so the test encClass.isProperlyContainedIn(topClass) fails.
Assigned to @DarkDimius .