Give the mutex lockers a tighter scope.