### 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)
Vector2 first_point = curve.get_point_position(0);
		Vector2 last_point = curve.get_point_position(curve.get_point_count() - 1);
		
		plot_func(Vector2(0, first_point.y) * scaling + Vector2(0.5, 0), first_point * scaling, false);
		plot_func(Vector2(Curve::MAX_X, last_point.y) * scaling - Vector2(1.5, 0), last_point * scaling, false);
		
		
		for (int i = 1; i < curve.get_point_count(); ++i) {
			Vector2 a = curve.get_point_position(i - 1);
			Vector2 b = curve.get_point_position(i);
			Vector2 pos = a;
			Vector2 prev_pos = a;
			float scaled_step = step / scaling.x;
			float samples = (b.x - a.x) / scaled_step;
			for (int j = 1; j < samples; j++) {
				float x = j * scaled_step;
				pos.x = a.x + x;
				pos.y = curve.sample_local_nocheck(i - 1, x);
				plot_func(prev_pos * scaling, pos * scaling, true);
				prev_pos = pos;
			}
			plot_func(prev_pos * scaling, b * scaling, true);
		}
	}
}
struct CanvasItemPlotCurve {
	CanvasItem &ci;
	Color color1;
	Color color2;
	CanvasItemPlotCurve(CanvasItem &p_ci, Color p_color1, Color p_color2) :