**Describe what's wrong**
Request with `DISTINCT`+`LIMIT BY`+`LIMIT` return less rows than provided in `LIMIT`

**Does it reproduce on recent release?**
22.11

**How to reproduce**
The following query from hits table returns less number of rows then provided in LIMIT
```
SELECT DISTINCT
    Title,
    SearchPhrase
FROM hits_v1
WHERE (SearchPhrase != '') AND (NOT match(Title, '[а-яА-ЯёЁ]')) AND (NOT match(SearchPhrase, '[а-яА-ЯёЁ]'))
LIMIT 1 BY
    Title,
    SearchPhrase
LIMIT 10
````
**Expected behavior**
Query returns number of rows provided in `LIMIT`

settings.min_free_disk_space_for_temporary_data,
        settings.compile_aggregate_expressions,
        settings.min_count_to_compile_aggregate_expression,
        settings.max_block_size,
        settings.enable_software_prefetch_in_aggregation,
         false,
        stats_collecting_params
    };
}
static GroupingSetsParamsList getAggregatorGroupingSetsParams(const SelectQueryExpressionAnalyzer & query_analyzer, const Names & all_keys)
{
    GroupingSetsParamsList result;
    if (query_analyzer.useGroupingSetKey())
    {
        auto const & aggregation_keys_list = query_analyzer.aggregationKeysList();
        for (const auto & aggregation_keys : aggregation_keys_list)
        {
            NameSet keys;
            for (const auto & key : aggregation_keys)
                keys.insert(key.name);
            Names missing_keys;
            for (const auto & key : all_keys)
                if (!keys.contains(key))
                    missing_keys.push_back(key);
            result.emplace_back(aggregation_keys.getNames(), std::move(missing_keys));
        }
    }
    return result;
}
void InterpreterSelectQuery::executeAggregation(QueryPlan & query_plan, const ActionsDAGPtr & expression, bool overflow_row, bool final, InputOrderInfoPtr group_by_info)