Yes, in fact this already existed in master HEAD...but only RegisterWallet() and UnregisterWallet() were using the lock.