v.20.12Bug Fix

Fixed Segfault in topK Aggregate Function

Fixed possible segfault in topK aggregate function. This closes #17404. #17845 (Maksim Kita).