LightWeightGSet uses a volatile integer to track the current modification number (kind of an epoch number).
Unfortunately, it includes code like this, that increments this volatile int:
The bug here is that in between reading the value of modification, incrementing it, and storing it back in the variable, another thread may have modified it. This could lead to lost updates.
We should use AtomicInteger for these cases.