`Check failed` in `tf.raw_ops.ScatterNd` and `tf.scatter_nd` 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/8013e3b310acafecc64a545fe8b07481/untitled1903.ipynb) and tf-nightly. Kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/1e46cf6271298b394bc293b3e5e58380/-6_tf_raw_ops_scatternd.ipynb).

![image](https://github.com/tensorflow/tensorflow/assets/81610181/ee6b8138-a792-457a-bec9-5eb616404a4e)

### 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.ScatterNd` and `tf.scatter_nd` 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/1rr8w5IOzVdjs07YECnyOsnFu3ouUFkBs?usp=sharing
```


### Relevant log output

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