Fix group post_filter has_key check on groups

The group post_filter checks for a key named 'group' instead of the
value of the group variable. When there are multiple candidates for a
group, they overwrite each other and only keep the most recent one.

I also updated test-sorter to use multiple candidates for a group. The
test wasn't failing because it only had one candidate for each group.