Protect against incorrect lock.Release() calls