If something fails while it has acquired a lock using a `with` block, it appears the lock doesn't get released. I think this needs a tweak to the StrictLock code.