Fix arbiter crash #1250

A service definition containing multiple servicegroups entries
may lead to an arbiter crash.

If you want me to, I can remove some unnecessary code from the test case.
bad indent here?