Fix discontinuity detection in revision traversal