make the IORef implementation of Locker behave like the GHC one