Merge [76990] from trunk:
Reverted earlier change to allow some speculative operations to be performed without holding the lock, as it introduced a race condition in some multithreaded scenarios.