Fix exponential explosion in code generator.