Added more test coverage for wait_group_events.
Refactored wait_group_events handling to detect divergence.