clear up race condition for was_locked (bug 88013)