fix improperly set group ids in case list

http://manage.dimagi.com/default.asp?101997
Merge pull request #2787 from dimagi/cz

fix improperly set group ids in case list