[BUGFIX] Fix foreign_table_where GROUP BY handling