### 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)
curve_editor_rect->set_snap_count(CLAMP(p_snap_count, 2, 100));
}
void CurveEditor::_on_preset_item_selected(int p_preset_id) {
	curve_editor_rect->use_preset(p_preset_id);
}
void CurveEditor::set_curve(const Ref<Curve> &p_curve) {
	curve_editor_rect->set_curve(p_curve);
}
void CurveEditor::_notification(int p_what) {
	switch (p_what) {
		case NOTIFICATION_THEME_CHANGED: {
			spacing = Math::round(BASE_SPACING * get_theme_default_base_scale());
			snap_button->set_icon(get_theme_icon(SNAME("SnapGrid"), SNAME("EditorIcons")));
			PopupMenu *p = presets_button->get_popup();
			p->clear();
			p->add_icon_item(get_theme_icon(SNAME("CurveConstant"), SNAME("EditorIcons")), TTR("Constant"), CurveEdit::PRESET_CONSTANT);
			p->add_icon_item(get_theme_icon(SNAME("CurveLinear"), SNAME("EditorIcons")), TTR("Linear"), CurveEdit::PRESET_LINEAR);
			p->add_icon_item(get_theme_icon(SNAME("CurveIn"), SNAME("EditorIcons")), TTR("Ease In"), CurveEdit::PRESET_EASE_IN);
			p->add_icon_item(get_theme_icon(SNAME("CurveOut"), SNAME("EditorIcons")), TTR("Ease Out"), CurveEdit::PRESET_EASE_OUT);
			p->add_icon_item(get_theme_icon(SNAME("CurveInOut"), SNAME("EditorIcons")), TTR("Smoothstep"), CurveEdit::PRESET_SMOOTHSTEP);
		} break;
		case NOTIFICATION_READY: {
			Ref<Curve> curve = curve_editor_rect->get_curve();
			/
			snap_button->set_pressed(curve->get_meta("_snap_enabled", false));
			snap_count_edit->set_value(curve->get_meta("_snap_count", DEFAULT_SNAP));
		} break;
	}
}
CurveEditor::CurveEditor() {