Fix saved state in parser when parsing fails