Simple fix for [#30] - now that compound group by uses a key value that
replaces the array of group by fields, replacing x.encode() with str(x)
fixes the problem when key x is an int.