Add a debugging trace point to `Locker.lock`.

Need to simulate a failed upgrade, even though such a failure does not
appear to be possible.

Closes #298.