       }
     }
 
+    _internalInvariant(nextIdx >= i && nextIdx <= bounds.upperBound)
     return nextIdx &- i
   }
 

    startingAt i: Int,
    in bounds: Range<Int>
  ) -> Int {
    _internalInvariant(bounds.contains(i))
    if _slowPath(isForeign) {
      return _foreignOpaqueCharacterStride(startingAt: i, in: bounds)

      }
    }

    _internalInvariant(bounds.contains(previousIdx))
    return i &- previousIdx
  }

