v.25.5Performance Improvement

Fix possible performance degradation of the parallel

Fix possible performance degradation of the parallel merging of uniqExact states for aggregation with key. #78724 (Nikita Taranov).