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

if (query.prewhere() && !query.where())
        analysis_result.prewhere_info->need_filter = true;
    if (table_id && got_storage_from_query && !joined_tables.isLeftTableFunction())
    {
        
        
        
        checkAccessRightsForSelect(context, table_id, metadata_snapshot, *syntax_analyzer_result);
        
        if (shouldIgnoreQuotaAndLimits(table_id) && (joined_tables.tablesCount() <= 1))
        {
            options.ignore_quota = true;
            options.ignore_limits = true;
        }
    }
    
    if (storage)
    {
        addPrewhereAliasActions();
        analysis_result.required_columns = required_columns;
    }
    if (query_info.projection)
        storage_snapshot->addProjection(query_info.projection->desc);
    
    
    
    sanitizeBlock(result_header, true);
}
void InterpreterSelectQuery::buildQueryPlan(QueryPlan & query_plan)