functionalization: check for undefined tensors in advanced indexing (#90791)
It looks like running code like `a[:, tensor_idx] = b` can results in:
(1) calling `index_put_()`
(2) passing (potential undefined) tensors as the indices to index_put_().
Pull Request resolved: https://github.com/pytorch/pytorch/pull/90791
Approved by: https://github.com/ezyang