   let s = summer + winter + winter + summer
   let v = s.unicodeScalars
   for i in s.characters.indices {
-    for j in i..<s.endIndex {
+    for j in s.characters.indices[i..<s.endIndex] {
       expectEqual(
         s[i..<j],
         String(v[i.samePosition(in: v)..<j.samePosition(in: v)])

  // Test all valid subranges si0..<si1 of positions in s.  ds is
  // always si0.distance(to: si1)
  for si0 in s.indices {
    for (ds, si1) in (si0..<s.endIndex).enumerated() {
      
      // Map those unicode scalar indices into utf8 indices
      let u8i1 = si1.samePosition(in: u8)

  let s = summer + winter + winter + summer
  let v = s.utf8
  for i in v.indices {
    for j in v.indices[i..<v.endIndex] {
      if let si = i.samePosition(in: s) {
        if let sj = j.samePosition(in: s) {
          expectEqual(s[si..<sj], String(v[i..<j])!)
