`Check failed` in `tf.raw_ops.TensorScatterSub` and `tf.tensor_scatter_nd_sub` when the rank of `indices` > 2.
@xl1043237213,
I was able to reproduce the issue on TensorFlow v2.15, [v2.16](https://colab.research.google.com/gist/tilakrayal/7aa51c492663fd71355d8fe946381b12/untitled1902.ipynb) and tf-nightly. Kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/1b071af1716f863529c76ed51c43f368/-6_tf_raw_ops_tensorscattersub.ipynb).

![image](https://github.com/tensorflow/tensorflow/assets/81610181/ce5792c7-f3e3-47f5-a345-15fc5aa7ed58)

### 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

_No response_

### 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.TensorScatterSub` and `tf.tensor_scatter_nd_sub` 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/1wqe_qe71oLucYiq1WS8s9GkZiVsNlaMz?usp=sharing
```


### Relevant log output

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