[Emulink] bugfix for codegeneration (runtime error due to undefined variable)