Is this safe when `windowGroups` is `nil`?