Issue #259: Preventing stream re-close