Fix #738 - Use an object instead of an array to hold groups by value.