This fixes our sanitizer builds which are currently red on master.
This is related to the currently open Core issue here: https://github.com/bitcoin/bitcoin/issues/15994
and associated un-merged PR mentioned in the comment in GuessVerificationProgress:
// This function assumes the lock on cs_main is already held (see the // above comment). This is a temporary check until PR15997 is backported. // https://github.com/bitcoin/bitcoin/pull/15997 AssertLockHeld(cs_main);
However, PR15997 is currently closed, pending a different approach being reviewed in https://github.com/bitcoin/bitcoin/pull/16426
Since it's unlikely that we'll be pulling in a refactor that large any time soon, we can apply this patch to fix the build in the mean time.