Fix race condition in alarm lock processing noticed by Richard Sharpe <realrichardsha...