Always unlock the lock

It is possible for block() to throw an exception that is caught by the
function caller. In the previous behavior, this would leave the program
executing, but the lock locked, potentially causing a deadlock.