more bug fixes for previous commit (prevent lexer productions from actually flattening)