Fixes #1108.  Added lock/block checks for the add() and remove() methods on a set