**Describe the bug**
When the requests are done in a very specific environment, they got an error from ClickHouse. The partially it was fixed in https://github.com/ClickHouse/ClickHouse/pull/21936

**Does it reproduce on recent release?**
It's reproducible with docker image `yandex/clickhouse-server:latest` having digest `sha256:d359e6cff39486d2563cd16a307e0981ea6150760d7589b35e0e76ee7ba889ce`

**How to reproduce**
The very precise case for reproduction is present in https://github.com/Felixoid/ch-forms-issue

**Expected behavior**
The requests should work
peeked_size = 0;
            res = sub_buf.hasPendingData() || sub_buf.next();
        }
    }
    
    Buffer & sub_working = sub_buf.buffer();
    BufferBase::set(sub_working.begin(), sub_working.size(), sub_buf.offset());
    nextimpl_working_buffer_offset = sub_buf.offset();
    if (checkpoint_at_end)
    {
        checkpoint.emplace(working_buffer.begin());
        peeked_size = 0;
        checkpoint_in_own_memory = false;
    }
    checkStateCorrect();
    return res;
}
void PeekableReadBuffer::checkStateCorrect() const
{
    if (checkpoint)
    {
        if (checkpointInOwnMemory())
        {
            if (!peeked_size)
                throw DB::Exception("Checkpoint in empty own buffer", ErrorCodes::LOGICAL_ERROR);
            if (currentlyReadFromOwnMemory() && pos < *checkpoint)
                throw DB::Exception("Current position in own buffer before checkpoint in own buffer", ErrorCodes::LOGICAL_ERROR);
            if (!currentlyReadFromOwnMemory() && pos < sub_buf.position())
                throw DB::Exception("Current position in subbuffer less than sub_buf.position()", ErrorCodes::LOGICAL_ERROR);