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

{
    auto & query = getSelectQuery();
    
    if (query.limitLength())
    {
        auto [limit_length, limit_offset] = getLimitLengthAndOffset(query, context);
        if (do_not_skip_offset)
        {
            if (limit_length > std::numeric_limits<UInt64>::max() - limit_offset)
                return;
            limit_length += limit_offset;
            limit_offset = 0;
        }
        const Settings & settings = context->getSettingsRef();
        auto limit = std::make_unique<LimitStep>(query_plan.getCurrentDataStream(), limit_length, limit_offset, settings.exact_rows_before_limit);
        if (do_not_skip_offset)
            limit->setStepDescription("preliminary LIMIT (with OFFSET)");
        else
            limit->setStepDescription("preliminary LIMIT (without OFFSET)");
        query_plan.addStep(std::move(limit));
    }
}
void InterpreterSelectQuery::executeLimitBy(QueryPlan & query_plan)