Fix inverted is_locked logic. (#1214)