Add test of groupby with immutable 'by'