[JIT] fix nested select assign (#32877)
Summary:
Fix for https://github.com/pytorch/pytorch/issues/31902
```
self.sub.a = 1
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/32877
Differential Revision: D19670322
Pulled By: eellison
fbshipit-source-id: 6d8f350b4d1169be1d2a56050fccd7c246ad9212