Fixed mix-up with iterators in GroupManager.