Bugfix on inherit private magic methods

Should probably be renamed to `ClassGeneratorUtils`