Open
Description
It looks like modules are not correctly initialized for derived classes where the module is used in the base class.
I have a base class TlsBuildingDefinition that uses a module called UnitDefinitionInitModule and a derived class called CannonTowerDefinition.
In the compiled lua you can see that the TlsBuildingDefinition create function initializes all the module fields, but the CannonTowerDefinition create function does not.
So, when constructing CannonTowerDefinition instance, all the module fields are nil and ultimately break a lot of dependent code.