**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)
```
{
    auto zookeeper = getZooKeeper();
    auto columns_from_entry = ColumnsDescription::parse(entry.columns_str);
    auto metadata_from_entry = ReplicatedMergeTreeTableMetadata::parse(entry.metadata_str);
    MergeTreeData::DataParts parts;
    
    Coordination::Requests requests;
    requests.emplace_back(zkutil::makeSetRequest(replica_path + "/columns", entry.columns_str, -1));
    requests.emplace_back(zkutil::makeSetRequest(replica_path + "/metadata", entry.metadata_str, -1));
    zookeeper->multi(requests);
    {
        auto lock = lockForAlter(RWLockImpl::NO_QUERY, getSettings()->lock_acquire_timeout_for_background_operations);
        LOG_INFO(log, "Metadata changed in ZooKeeper. Applying changes locally.");
        auto metadata_diff = ReplicatedMergeTreeTableMetadata(*this, getInMemoryMetadataPtr()).checkAndFindDiff(metadata_from_entry);
        setTableStructure(std::move(columns_from_entry), metadata_diff);
        metadata_version = entry.alter_version;
        LOG_INFO(log, "Applied changes to the metadata of the table. Current metadata version: {}", metadata_version);
    }
    
    zookeeper->createOrUpdate(replica_path + "/metadata_version", std::to_string(metadata_version), zkutil::CreateMode::Persistent);
    return true;
}
void StorageReplicatedMergeTree::alter(
    const AlterCommands & commands, const Context & query_context, TableLockHolder & table_lock_holder)
{
    assertNotReadonly();
    auto table_id = getStorageID();
    if (commands.isSettingsAlter())
    {