Deduplicate
Reset the lazy decoder state consistently if an error occurs

This fixes gh-87.