core: fix errors in try/catch processing (issue #13)
core: check for duplicated code generation