make the read/write operations over sets atomic
Fixes: #5009
Merge remote-tracking branch 'refs/remotes/kali/bug/make-property-sets-atomic' into develop