fix bug: flatten nested arrays of code chunks when constructing the lexer rule actions