Add a test and fixes which exercises reset_buffers of string (in a groupby)
Fix for build error on OS X