**Describe the bug**
The ClickHouse client freezes when executing `ALTER TABLE` with `ADD COLUMN` and `MODIFY ORDER` on a table built using Replicated Versioned Collapsing Merge Tree engine.

**How to reproduce**
* ClickHouse client version 20.10.1.1.
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 20.10.1 revision 54440.

* `CREATE TABLE` statements
```
SHOW CREATE TABLE table0

┌─statement──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ CREATE TABLE default.table0
(
    `d` Date,
    `a` String,
    `b` UInt8,
    `x` String,
    `y` Int8,
    `version` UInt64,
    `sign` Int8 DEFAULT 1
)
ENGINE = ReplicatedVersionedCollapsingMergeTree('/clickhouse/tables/{shard}/table0', '{replica}', sign, version)
PARTITION BY y
ORDER BY d
SETTINGS index_granularity = 8192 │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

1 rows in set. Elapsed: 0.004 sec.
```

* Queries to run that lead to unexpected result
```
ALTER TABLE table0 ADD COLUMN order UInt32, MODIFY ORDER BY (d, order)
```
const String & replica, const ReplicatedMergeTreeLogEntryData & entry, bool wait_for_non_active)
{
    String entry_str = entry.toString();
    String log_node_name;
    /** Two types of entries can be passed to this function
      * 1. (more often) From `log` directory - a common log, from where replicas copy entries to their queue.
      * 2. From the `queue` directory of one of the replicas.
      *
      * The problem is that the numbers (`sequential` node) of the queue elements in `log` and in `queue` do not match.
      * (And the numbers of the same log element for different replicas do not match in the `queue`.)
      *
      * Therefore, you should consider these cases separately.
      */
    /** First, you need to wait until replica takes `queue` element from the `log` to its queue,
      *  if it has not been done already (see the `pullLogsToQueue` function).
      *
      * To do this, check its node `log_pointer` - the maximum number of the element taken from `log` + 1.
      */
    bool waiting_itself = replica == replica_name;
    const auto & stop_waiting = [&]()
    {
        bool stop_waiting_itself = waiting_itself && is_dropped;
        bool stop_waiting_non_active = !wait_for_non_active && !getZooKeeper()->exists(zookeeper_path + "/replicas/" + replica + "/is_active");
        return stop_waiting_itself || stop_waiting_non_active;
    };
    constexpr auto event_wait_timeout_ms = 1000;
    if (startsWith(entry.znode_name, "log-"))
    {
        /** In this case, just take the number from the node name `log-xxxxxxxxxx`.
          */