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

(!input_pipe && storage) ? "Storage " + storage->getName() + " doesn't support FINAL" : "Illegal FINAL",
                    ErrorCodes::ILLEGAL_FINAL);
            if (query.prewhere() && (input_pipe || !storage || !storage->supportsPrewhere()))
                throw Exception(
                    (!input_pipe && storage) ? "Storage " + storage->getName() + " doesn't support PREWHERE" : "Illegal PREWHERE",
                    ErrorCodes::ILLEGAL_PREWHERE);
            
            for (const auto & it : query_analyzer->getExternalTables())
                if (!context->tryResolveStorageID({"", it.first}, Context::ResolveExternal))
                    context->addExternalTable(it.first, std::move(*it.second));
        }
        if (!options.only_analyze || options.modify_inplace)
        {
            if (syntax_analyzer_result->rewrite_subqueries)
            {
                
                interpreter_subquery = joined_tables.makeLeftTableSubquery(options.subquery());
            }
        }
        if (interpreter_subquery)
        {
            
            if (query_analyzer->hasAggregation())
                interpreter_subquery->ignoreWithTotals();
            uses_view_source |= interpreter_subquery->usesViewSource();
        }
        required_columns = syntax_analyzer_result->requiredSourceColumns();
        if (storage)
        {
            query_info.filter_asts.clear();