GetNext returns an error when there is lex error