Reapply r79708 with the appropriate fix for the case that still requires locking.