Lock should be released if job does not exist

Reviewed at https://reviews.apache.org/r/16268/