Groups must be locked during reset, otherwise the collection can be modified while enumerating.
Thanks to @NeoAcheron