<p dir="auto">I can't explain this one. Here's a test case I've been able to whittle down from a bigger class:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="'use strict';

const Thing = {

  x() {
    return &lt;Dingbat uid={'hello'}/&gt;;
  },

  y() {
    for (let row of this.rows) {
      let uid = 42;
      console.log(uid);
    }
  }
};"><pre class="notranslate"><span class="pl-s">'use strict'</span><span class="pl-kos">;</span>

<span class="pl-k">const</span> <span class="pl-v">Thing</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>

  <span class="pl-en">x</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">return</span> <span class="pl-c1">&lt;</span><span class="pl-ent">Dingbat</span> <span class="pl-c1">uid</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s">'hello'</span><span class="pl-kos">}</span><span class="pl-c1">/</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span><span class="pl-kos">,</span>

  <span class="pl-en">y</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">let</span> <span class="pl-s1">row</span> <span class="pl-k">of</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">rows</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      <span class="pl-k">let</span> <span class="pl-s1">uid</span> <span class="pl-c1">=</span> <span class="pl-c1">42</span><span class="pl-kos">;</span>
      <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">uid</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">The generated code (unrelated parts elided):</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="for (var _iterator = this.rows[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
  var row = _step.value;
  var _uid = 42;
  console.log(uid);
}"><pre class="notranslate"><span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">_iterator</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">rows</span><span class="pl-kos">[</span><span class="pl-v">Symbol</span><span class="pl-kos">.</span><span class="pl-c1">iterator</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-s1">_step</span><span class="pl-kos">;</span> <span class="pl-c1">!</span><span class="pl-kos">(</span><span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">_step</span> <span class="pl-c1">=</span> <span class="pl-s1">_iterator</span><span class="pl-kos">.</span><span class="pl-en">next</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">done</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-k">var</span> <span class="pl-s1">row</span> <span class="pl-c1">=</span> <span class="pl-s1">_step</span><span class="pl-kos">.</span><span class="pl-c1">value</span><span class="pl-kos">;</span>
  <span class="pl-k">var</span> <span class="pl-s1">_uid</span> <span class="pl-c1">=</span> <span class="pl-c1">42</span><span class="pl-kos">;</span>
  <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">uid</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Note how <code class="notranslate">_uid</code> is assigned, but it's accessed as <code class="notranslate">uid</code>. If I change the JSX line to something else (eg., <code class="notranslate">&lt;Dingbat bing={'hello'}/&gt;;</code>) the problem goes away. Seems to me like the JSX scope is leaking into the parallel function scope, and somehow breaking it. I've not been able to reproduce the effect in any other way; replacing the JSX with plain JS code stops the bug from happening, for example.</p>
<p dir="auto">However, this bug is oddly similar to <a href="https://github.com/babel/babel/issues/1169" data-hovercard-type="issue" data-hovercard-url="/babel/babel/issues/1169/hovercard">this</a> issue. Same underlying cause, perhaps?</p>
<p dir="auto">With the code:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function foo() {
  let input = ['a', 'b', 'c']
  let output = {}

  for (let c of input) {
    let name = c
    output[name] = name
  }

  return output
}"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-k">let</span> <span class="pl-s1">input</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-s">'a'</span><span class="pl-kos">,</span> <span class="pl-s">'b'</span><span class="pl-kos">,</span> <span class="pl-s">'c'</span><span class="pl-kos">]</span>
  <span class="pl-k">let</span> <span class="pl-s1">output</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>

  <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">let</span> <span class="pl-s1">c</span> <span class="pl-k">of</span> <span class="pl-s1">input</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">let</span> <span class="pl-s1">name</span> <span class="pl-c1">=</span> <span class="pl-s1">c</span>
    <span class="pl-s1">output</span><span class="pl-kos">[</span><span class="pl-s1">name</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">name</span>
  <span class="pl-kos">}</span>

  <span class="pl-k">return</span> <span class="pl-s1">output</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">The output from babel is:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="'use strict';

function foo() {
  var input = ['a', 'b', 'c'];
  var output = {};

  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;

  try {
    for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      var c = _step.value;

      var _name = c;
      output[name] = name;
    }
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion &amp;&amp; _iterator['return']) {
        _iterator['return']();
      }
    } finally {
      if (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }

  return output;
}"><pre class="notranslate"><span class="pl-s">'use strict'</span><span class="pl-kos">;</span>

<span class="pl-k">function</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-k">var</span> <span class="pl-s1">input</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-s">'a'</span><span class="pl-kos">,</span> <span class="pl-s">'b'</span><span class="pl-kos">,</span> <span class="pl-s">'c'</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
  <span class="pl-k">var</span> <span class="pl-s1">output</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span>

  <span class="pl-k">var</span> <span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
  <span class="pl-k">var</span> <span class="pl-s1">_didIteratorError</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">;</span>
  <span class="pl-k">var</span> <span class="pl-s1">_iteratorError</span> <span class="pl-c1">=</span> <span class="pl-c1">undefined</span><span class="pl-kos">;</span>

  <span class="pl-k">try</span> <span class="pl-kos">{</span>
    <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">_iterator</span> <span class="pl-c1">=</span> <span class="pl-s1">input</span><span class="pl-kos">[</span><span class="pl-v">Symbol</span><span class="pl-kos">.</span><span class="pl-c1">iterator</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-s1">_step</span><span class="pl-kos">;</span> <span class="pl-c1">!</span><span class="pl-kos">(</span><span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">_step</span> <span class="pl-c1">=</span> <span class="pl-s1">_iterator</span><span class="pl-kos">.</span><span class="pl-en">next</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">done</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      <span class="pl-k">var</span> <span class="pl-s1">c</span> <span class="pl-c1">=</span> <span class="pl-s1">_step</span><span class="pl-kos">.</span><span class="pl-c1">value</span><span class="pl-kos">;</span>

      <span class="pl-k">var</span> <span class="pl-s1">_name</span> <span class="pl-c1">=</span> <span class="pl-s1">c</span><span class="pl-kos">;</span>
      <span class="pl-s1">output</span><span class="pl-kos">[</span><span class="pl-s1">name</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">name</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span> <span class="pl-k">catch</span> <span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-s1">_didIteratorError</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
    <span class="pl-s1">_iteratorError</span> <span class="pl-c1">=</span> <span class="pl-s1">err</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span> <span class="pl-k">finally</span> <span class="pl-kos">{</span>
    <span class="pl-k">try</span> <span class="pl-kos">{</span>
      <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">!</span><span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-s1">_iterator</span><span class="pl-kos">[</span><span class="pl-s">'return'</span><span class="pl-kos">]</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-s1">_iterator</span><span class="pl-kos">[</span><span class="pl-s">'return'</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
      <span class="pl-kos">}</span>
    <span class="pl-kos">}</span> <span class="pl-k">finally</span> <span class="pl-kos">{</span>
      <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">_didIteratorError</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-k">throw</span> <span class="pl-s1">_iteratorError</span><span class="pl-kos">;</span>
      <span class="pl-kos">}</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span>

  <span class="pl-k">return</span> <span class="pl-s1">output</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Specifically, the problematic generated code is here:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var _name = c;
output[name] = name;"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">_name</span> <span class="pl-c1">=</span> <span class="pl-s1">c</span><span class="pl-kos">;</span>
<span class="pl-s1">output</span><span class="pl-kos">[</span><span class="pl-s1">name</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">name</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">It should be <code class="notranslate">output[_name] = _name;</code></p>
<p dir="auto">This works fine in a regular for loop, and works fine if <code class="notranslate">name</code> is declared with <code class="notranslate">var</code></p>