In Penknife, fixed a potential JS stack overflow opportunity in the generated code.