title: eval fails to detect an iterating variable when evaluating a generator
body: <p>Consider the following code:</p>
  
  <pre><code>print([a for a in [0] if eval("a in [0]")])
  b = 0
  print([b if eval("True in (x == b for x in [0])") else ''])
  print([a for a in [0] if eval("True in (x == a for x in [0])")])
  </code></pre>
  
  <p>The output of this is:</p>
  
  <pre><code>[0]
  [0]
  Traceback (most recent call last):
    File "…", line 4, in &lt;module&gt;
      print([a for a in [0] if eval("False in (x == a for x in [0])")])
    File "…", line 4, in &lt;listcomp&gt;
      print([a for a in [0] if eval("False in (x == a for x in [0])")])
    File "&lt;string&gt;", line 1, in &lt;module&gt;
    File "&lt;string&gt;", line 1, in &lt;genexpr&gt;
  NameError: name 'a' is not defined
  </code></pre>
  
  <p>The first eval uses the iterator <code>a</code> in a plain eval, and it works.</p>
  
  <p>The second eval uses a static variable <code>b</code> when evaluating a generator, and it works. </p>
  
  <p>The third eval combines the two ideas - it uses an iterator variable when evaluating a generator, and it fails to detect the variable and raises an error. Why does this happen?</p>