Clear stream error state before seeking

Fixes #4362