**Describe the bug**
ClickHouse version: 20.8.2.3
`SELECT DISTINCT b FROM (SELECT a, b FROM d GROUP BY a, b)` may return duplicate result, here is the step to reproduce:

```sql
CREATE TABLE test_local ON CLUSTER xxx (a String, b Int) Engine=TinyLog;
CREATE TABLE test ON CLUSTER xxx (a String, b Int) Engine = Distributed('xxx', 'default', 'test_local', b);
INSERT INTO test VALUES('a', 0), ('a', 1), ('b', 0)
SELECT DISTINCT b FROM (SELECT b FROM test GROUP BY a, b)
```
Expected result:
0
1
Actual result:
0
0
1

**Possible reason:**

`DistinctStep::checkColumnsAlreadyDistinct` return true while `b` exists in its front inputstream's `distinct_columns`(which is `a` and `b` in previous SQL), so `DistinctStep` is skipped in the final execution pipeline. As the comment of  `DataStream::distinct_columns` says: "Tuples with those columns are distinct. It doesn't mean that columns are distinct separately.", `DistinctStep::checkColumnsAlreadyDistinct` may return wrong result.


const DataStream & input_stream_,
    const SizeLimits & set_size_limits_,
    UInt64 limit_hint_,
    const Names & columns_,
    bool pre_distinct_)
    : ITransformingStep(
            input_stream_,
            input_stream_.header,
            getTraits(pre_distinct_, checkColumnsAlreadyDistinct(columns_, input_stream_.distinct_columns)))
    , set_size_limits(set_size_limits_)
    , limit_hint(limit_hint_)
    , columns(columns_)
    , pre_distinct(pre_distinct_)
{
    if (!output_stream->distinct_columns.empty() 
        && (!pre_distinct 
            || input_stream_.has_single_port)) 
    {
        
        for (const auto & name : columns)
            output_stream->distinct_columns.insert(name);
    }
}
void DistinctStep::transformPipeline(QueryPipeline & pipeline)