### Godot version

4.1.beta1

### System information

macOS 13.3.1 mobile renderer

### Issue description

Trying to open and edit one of my visual shaders now consistently crashes Godot 4.1beta1. 

The shader was made and edited fine in earlier versions of Godot 4 and I'm not certain what is special with this shader (attached below for investigation). Opening and editing other visual shaders works fine for me. The only thing I can think of that this shader uses that other do not is the gradient node, though as I can't open it I'm not sure what else might be going on in it.

### Steps to reproduce

Open the attached visual shader (in any project)

### Minimal reproduction project

[ConnectBlendShader.tres.zip](https://www.lostminds.com/godot/ConnectBlendShader.tres.zip)
set_selected_index(-1);
						} else {
							remove_point(point_to_remove);
						}
						hovered_index = get_point_at(mpos);
						grabbing = GRAB_NONE;
					}
				}
			}
		}
		
		if (mb->get_button_index() == MouseButton::LEFT) {
			if (grabbing == GRAB_NONE) {
				selected_tangent_index = get_tangent_at(mpos);
				if (selected_tangent_index == TANGENT_NONE) {
					set_selected_index(get_point_at(mpos));
				}
				queue_redraw();
			}
			if (selected_index != -1) {
				
				grabbing = GRAB_MOVE;
				initial_grab_pos = curve->get_point_position(selected_index);
				initial_grab_index = selected_index;
				if (selected_index > 0) {
					initial_grab_left_tangent = curve->get_point_left_tangent(selected_index);
				}
				if (selected_index < curve->get_point_count() - 1) {
					initial_grab_right_tangent = curve->get_point_right_tangent(selected_index);
				}