CHEF-4010 Ensure lock release for all operations