**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`

for (const auto & key : query_analyzer->aggregationKeys())
                res.insert({nullptr, makeNullableSafe(header.getByName(key.name).type), key.name});
        }
        else
        {
            for (const auto & key : query_analyzer->aggregationKeys())
                res.insert({nullptr, header.getByName(key.name).type, key.name});
        }
        for (const auto & aggregate : query_analyzer->aggregates())
        {
            size_t arguments_size = aggregate.argument_names.size();
            DataTypes argument_types(arguments_size);
            for (size_t j = 0; j < arguments_size; ++j)
                argument_types[j] = header.getByName(aggregate.argument_names[j]).type;
            DataTypePtr type = std::make_shared<DataTypeAggregateFunction>(aggregate.function, argument_types, aggregate.parameters);
            res.insert({nullptr, type, aggregate.column_name});
        }
        return res;
    }
    if (options.to_stage >= QueryProcessingStage::Enum::WithMergeableStateAfterAggregation)
    {
        
        
        if (analysis_result.before_window)
            return analysis_result.before_window->getResultColumns();
        return analysis_result.before_order_by->getResultColumns();
    }
    return analysis_result.final_projection->getResultColumns();
}
static std::pair<Field, DataTypePtr> getWithFillFieldValue(const ASTPtr & node, ContextPtr context)