Therefore is this a codegenerator bug? I'm going mad to figure where is the wrong code