Fixed bug in emission of trait impl classes.