BytecodeGenerator needs to be re-entrant to support miranda functions