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

{
    BlockIO res;
    QueryPlan query_plan;
    buildQueryPlan(query_plan);
    auto builder = query_plan.buildQueryPipeline(
        QueryPlanOptimizationSettings::fromContext(context), BuildQueryPipelineSettings::fromContext(context));
    res.pipeline = QueryPipelineBuilder::getPipeline(std::move(*builder));
    setQuota(res.pipeline);
    return res;
}
Block InterpreterSelectQuery::getSampleBlockImpl()
{
    auto & select_query = getSelectQuery();
    query_info.query = query_ptr;
    
    query_info.has_window = query_analyzer->hasWindow();
    
    query_info.has_order_by = select_query.orderBy() != nullptr;
    query_info.need_aggregate = query_analyzer->hasAggregation();
    if (storage && !options.only_analyze)
    {
        query_analyzer->makeSetsForIndex(select_query.where());
        query_analyzer->makeSetsForIndex(select_query.prewhere());
        query_info.prepared_sets = query_analyzer->getPreparedSets();
        from_stage = storage->getQueryProcessingStage(context, options.to_stage, storage_snapshot, query_info);
    }