Check if the stream is not already closed in AbstractAdapter::copy