This is useful on close or stream aborts as it saves us from having to manipulate the (sometimes confusing) flags.