BUG: Bug in consistency of groupby aggregation when passing a custom function (GH6715)

closes #6715