fixed groupBy for dealing w/ built-in properties (e.g. toString)