Fix lex_state after 'then' keyword