classifier: Refactor cls_cursor_advance() to make it easier to follow.