Fix a crash on group_by of empty list. Fixes #208.