SES-1993 : Replace synchronisation with a copy of the sets
SES-1993 : Get a hard reference to object in weak reference

Cannot rely on two subsequent calls to WeakReference.get to both return
not null, as the hard reference in existence may have been GC'd between
the two calls, causing the weak reference to return null the second
time. Avoid this possibility by storing the reference locally after
first call.