can't think of how that'd even happen tbh
Wonder if it might be some other mod calling .destroy() on a wisp unit group in the same tick, so it doesn't get removed from entities, but invalidated instead.
If that's indeed the case, bit weird that other mod would touch these entities like that - might be by accident and a bug there.
Shouldn't be really breaking anything here now though, can just disband groups of wisps randomly.