[JIT] fix comprehension scope writes (#36105)
Summary:
In a comprehension like:
```
def f()->int:
i = 1
x = [i for i in range(7)]
return i
```
the variables inside the comprehension do not write to the function environment.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36105
Differential Revision: D20880699
Pulled By: eellison
fbshipit-source-id: 40af0f7470e0baeff7ef158cb461bf85c816d169