Issue #2099893 by plach, Fabianx: Fixed [Stampede protection broken] Race condition in locking framework.