**Describe the bug**
When using ORDER BY with multiple expressions on a MergeTree table, the ordering is not correct.


**How to reproduce**
` yandex/clickhouse-server:20.5.2.7`

Create the table:
```sql
create table order_test
(
    timestamp DateTime64(3),
    color     LowCardinality(Nullable(String))
) engine = MergeTree()
      PARTITION BY toYYYYMM(timestamp)
      ORDER BY timestamp
      SETTINGS index_granularity = 8192;
```

Fill the table (run a few time times to get a range of timestamps):
```sql
insert into order_test
select now64(),
       arrayElement(['red', 'green', 'blue', null], modulo(number, 4) + 1) as color
from (select number from system.numbers limit 1000000);
```

Query:
```sql
SELECT count(),
       color,
       toStartOfSecond(timestamp) AS `second`
FROM order_test AS i
GROUP BY color, `second`
ORDER BY color, `second` desc
LIMIT 500;
```


See out of order results:
```
500000,blue,2020-08-21 18:30:06.000
500000,blue,2020-08-21 18:30:09.000
250000,blue,2020-08-21 18:30:03.000
250000,blue,2020-08-21 18:30:08.000
250000,blue,2020-08-21 18:30:07.000
```

**Expected behavior**
See results in order by descending second:
```
500000,blue,2020-08-21 18:30:09.000
250000,blue,2020-08-21 18:30:08.000
250000,blue,2020-08-21 18:30:07.000
500000,blue,2020-08-21 18:30:06.000
250000,blue,2020-08-21 18:30:03.000
```

Notes:

It appears when I take out `LowCardinality` from the color column, the order works as expected. 



{
    gatherer.gather(*this);
}
MutableColumnPtr ColumnLowCardinality::cloneResized(size_t size) const
{
    auto unique_ptr = dictionary.getColumnUniquePtr();
    if (size == 0)
        unique_ptr = unique_ptr->cloneEmpty();
    return ColumnLowCardinality::create(IColumn::mutate(std::move(unique_ptr)), getIndexes().cloneResized(size));
}
int ColumnLowCardinality::compareAt(size_t n, size_t m, const IColumn & rhs, int nan_direction_hint) const
{
    const auto & low_cardinality_column = assert_cast<const ColumnLowCardinality &>(rhs);
    size_t n_index = getIndexes().getUInt(n);
    size_t m_index = low_cardinality_column.getIndexes().getUInt(m);
    return getDictionary().compareAt(n_index, m_index, low_cardinality_column.getDictionary(), nan_direction_hint);
}
void ColumnLowCardinality::compareColumn(const IColumn & rhs, size_t rhs_row_num,
                                         PaddedPODArray<UInt64> * row_indexes, PaddedPODArray<Int8> & compare_results,
                                         int direction, int nan_direction_hint) const
{
    return doCompareColumn<ColumnLowCardinality>(
            assert_cast<const ColumnLowCardinality &>(rhs), rhs_row_num, row_indexes,
            compare_results, direction, nan_direction_hint);
}
void ColumnLowCardinality::getPermutation(bool reverse, size_t limit, int nan_direction_hint, Permutation & res) const