Fixed the generation of fields of a type def type by correctly desugaring