Fix binary search off by one in caretPositionInternal.TrySet().