              (expr = @balancedString str[i + 1..], '}')
         continue
       # NEOSTRING is a fake token.  This will be converted to a string below.
-      tokens.push @makeToken('NEOSTRING', str[pi...i], offsetInChunk + pi) if pi < i
+      tokens.push @makeToken('NEOSTRING', str[pi...i], strOffset + pi) if pi < i
       inner = expr[1...-1]
       if inner.length
-        [line, column] = @getLineAndColumnFromChunk(offsetInChunk + i + 1)
+        [line, column] = @getLineAndColumnFromChunk(strOffset + i + 1)
         nested = new Lexer().tokenize inner, line: line, column: column, rewrite: off
         popped = nested.pop()
         popped = nested.shift() if nested[0]?[0] is 'TERMINATOR'
         if len = nested.length
           if len > 1
-            nested.unshift @makeToken '(', '(', offsetInChunk + i + 1, 0
-            nested.push    @makeToken ')', ')', offsetInChunk + i + 1 + inner.length, 0
+            nested.unshift @makeToken '(', '(', strOffset + i + 1, 0
+            nested.push    @makeToken ')', ')', strOffset + i + 1 + inner.length, 0
           # Push a fake 'TOKENS' token, which will get turned into real tokens below.
           tokens.push ['TOKENS', nested]
       i += expr.length
       pi = i + 1
-    tokens.push @makeToken('NEOSTRING', str[pi..], offsetInChunk + pi) if i > pi < str.length
+    tokens.push @makeToken('NEOSTRING', str[pi..], strOffset + pi) if i > pi < str.length
 
     # If regex, then return now and let the regex code deal with all these fake tokens
     return tokens if regex
 
     # If we didn't find any tokens, then just return an empty string.
-    return @token 'STRING', '""', originalOffsetInChunk, lexedLength unless tokens.length
+    return @token 'STRING', '""', offsetInChunk, lexedLength unless tokens.length
 
     # If the first token is not a string, add a fake empty string to the beginning.
-    tokens.unshift @makeToken('NEOSTRING', '', originalOffsetInChunk) unless tokens[0][0] is 'NEOSTRING'
-
-    @token '(', '(', originalOffsetInChunk, 0 if interpolated = tokens.length > 1
+    tokens.unshift @makeToken('NEOSTRING', '', offsetInChunk) unless tokens[0][0] is 'NEOSTRING'
+
+    @token '(', '(', offsetInChunk, 0 if interpolated = tokens.length > 1
     # Push all the tokens
     for token, i in tokens
       [tag, value] = token

        @tokens.push token
      else
        @error "Unexpected #{tag}"
    @token ')', ')', originalOffsetInChunk + lexedLength, 0 if interpolated
    tokens

  # Pairs up a closing token, ensuring that all listed pairs of tokens are

    quote = heredoc.charAt 0
    doc = @sanitizeHeredoc match[2], quote: quote, indent: null
    if quote is '"' and 0 <= doc.indexOf '#{'
      @interpolateString doc, heredoc: yes, strOffset: 3, lexedLength: heredoc.length
    else
      @token 'STRING', @makeString(doc, quote, yes), 0, heredoc.length
    heredoc.length
