`Check failed` in `tf.raw_ops.TensorScatterUpdate` and `tf.tensor_scatter_nd_update` when the rank of `indices` > 2.
Hi **@xl1043237213** ,

I tried to run your code on colab using TF v2.15, 2.16, nightly and faced the same issue. Please find the [gist](https://colab.sandbox.google.com/gist/Venkat6871/2c96b6260a4669cf88c684810251a99b/65667_2-15-2-16-1-nightly.ipynb) here for reference.

Thank you!
### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

binary

### TensorFlow version

tf 2.15

### Custom code

No

### OS platform and distribution

Linux Ubuntu 20.04

### Mobile device

_No response_

### Python version

3.10

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

`Check failed` in `tf.raw_ops.TensorScatterUpdate` and `tf.tensor_scatter_nd_update` when the rank of `indices` > 2, which causes the program to crash. See the colab link below for details.

### Standalone code to reproduce the issue

```shell
https://colab.research.google.com/drive/1PLVxv-jQDZ15P4lrd3AhyVU-RAesammI?usp=sharing
```


### Relevant log output

```shell
Check failed: d < dims() (1 vs. 1)
```
