runtime: codeLoader: fix variable scope problem