How to reproduce (this is the part of 01526_alter_add_and_modify_order_zookeeper test):

```sql
CREATE TABLE table_for_alter
(
    `d` Date,
    `a` String,
    `b` UInt8,
    `x` String,
    `y` Int8,
    `version` UInt64,
    `sign` Int8 DEFAULT 1
)
ENGINE = ReplicatedVersionedCollapsingMergeTree('/clickhouse/tables/01526_alter_add/t4', '1', sign, version)
PARTITION BY y
ORDER BY d
SETTINGS index_granularity = 8192;

INSERT INTO table_for_alter VALUES(toDate('2019-10-01'), 'a', 1, 'aa', 1, 1, 1);

ALTER TABLE table_for_alter ADD COLUMN order UInt32, MODIFY ORDER BY (d, order);
```

After restarting server it fails with the error:
```
<Error> Application: DB::Exception: Existing table metadata in ZooKeeper differs in sorting key expression. Stored in ZooKeeper: d, order, local: d, order, version: Cannot attach table `default`.`table_for_alter` from metadata file /home/avogar/ClickHouse/programs/server/store/379/3795dcee-cc60-41ab-b795-dceecc6001ab/table_for_alter.sql from query ATTACH TABLE default.table_for_alter UUID 'b7e7470c-6fcb-4a95-b7e7-470c6fcbda95' (`d` Date, `a` String, `b` UInt8, `x` String, `y` Int8, `version` UInt64, `sign` Int8 DEFAULT 1, `order` UInt32) ENGINE = ReplicatedVersionedCollapsingMergeTree('/clickhouse/tables/01526_alter_add/t4', '1', sign, version) PARTITION BY y PRIMARY KEY d ORDER BY (d, order) SETTINGS index_granularity = 8192: while loading database `default` from path ./metadata/default
```
{
    in >> "metadata format version: 1\n";
    in >> "date column: " >> date_column >> "\n";
    in >> "sampling expression: " >> sampling_expression >> "\n";
    in >> "index granularity: " >> index_granularity >> "\n";
    in >> "mode: " >> merging_params_mode >> "\n";
    in >> "sign column: " >> sign_column >> "\n";
    in >> "primary key: " >> primary_key >> "\n";
    if (in.eof())
        data_format_version = 0;
    else if (checkString("data format version: ", in))
        in >> data_format_version.toUnderType() >> "\n";
    if (data_format_version >= MERGE_TREE_DATA_MIN_FORMAT_VERSION_WITH_CUSTOM_PARTITIONING)
        in >> "partition key: " >> partition_key >> "\n";
    if (checkString("sorting key: ", in))
        in >> sorting_key >> "\n";
    if (checkString("ttl: ", in))
        in >> ttl_table >> "\n";
    if (checkString("indices: ", in))
        in >> skip_indices >> "\n";
    if (checkString("projections: ", in))
        in >> projections >> "\n";
    if (checkString("granularity bytes: ", in))
    {
        in >> index_granularity_bytes >> "\n";
        index_granularity_bytes_found_in_zk = true;