Fix regression of 544c854810bfdefe55d4e0aadaef3a8c3c168d01
Respect state resets and parsing errors