Account for the possible holes in the set of keys.
A variant with atomics