I suspect this issue is connected to #16.
I chased down that one. The same class builder instance is used for reshaping and recompiling the whole hierarchy. Of course this builder sets the environment in every sub-class to the same and sometimes wrong one.
The shape of a class with sub-classes in different modules, replaces those sub-classes with the same name with the top-level class of the whole hierarchy.