Add predicate locks support in check_locks