Make sure compression contexts are destroyed after closing the stream