 
   /// Whether we have exhausted the generator.  Note that this doesn't mean
   /// we are done decoding, as there might still be bytes left in the buffer.
-  var _atEnd: Bool = false
+  var _didExhaustGenerator: Bool = false
 
   /// Start or continue decoding a UTF-8 sequence.
   ///

    G : GeneratorType where G.Element == CodeUnit
    >(next: inout G) -> UnicodeDecodingResult {

      refillBuffer: if !_atEnd {
        // Bufferless ASCII fastpath.
        if _fastPath(_bitsInBuffer == 0) {
          if let codeUnit = next.next() {

            // We use & 0x1f to make the compiler omit a bounds check branch.
            _decodeBuffer |= (UInt32(codeUnit) << UInt32(_bitsInBuffer & 0x1f))
            _bitsInBuffer = _bitsInBuffer &+ 8
          } else {
            _didExhaustGenerator = true
            if _bitsInBuffer == 0 { return .EmptyInput }
            break // We still have some bytes left in our buffer.
          }
