Reduce scope of global lock during RPC calls.