### Godot version

4.0.1(flatpak)

### System information

Linux openSUSE

### Issue description

Cyclic Dependencies in shader result in infinite loop

### Steps to reproduce

Create 'main' shader that includes other shader, let's say `inc_me1` and `inc_me2` if 'inc_me1' that includes 'main' shader and 'inc_me2' includes 'inc_me1'. It results in a freeze.

### Minimal reproduction project

[Shader dependency.zip](https://github.com/godotengine/godot/files/11547654/Shader.dependency.zip)
uncomment include, and the editor will freeze and crash
return true;
}
void Shader::_update_shader() const {
}
Array Shader::_get_shader_uniform_list(bool p_get_groups) {
	List<PropertyInfo> uniform_list;
	get_shader_uniform_list(&uniform_list, p_get_groups);
	Array ret;
	for (const PropertyInfo &pi : uniform_list) {
		ret.push_back(pi.operator Dictionary());
	}
	return ret;
}
void Shader::_bind_methods() {
	ClassDB::bind_method(D_METHOD("get_mode"), &Shader::get_mode);
	ClassDB::bind_method(D_METHOD("set_code", "code"), &Shader::set_code);
	ClassDB::bind_method(D_METHOD("get_code"), &Shader::get_code);
	ClassDB::bind_method(D_METHOD("set_default_texture_parameter", "name", "texture", "index"), &Shader::set_default_texture_parameter, DEFVAL(0));
	ClassDB::bind_method(D_METHOD("get_default_texture_parameter", "name", "index"), &Shader::get_default_texture_parameter, DEFVAL(0));
	ClassDB::bind_method(D_METHOD("get_shader_uniform_list", "get_groups"), &Shader::_get_shader_uniform_list, DEFVAL(false));
	ADD_PROPERTY(PropertyInfo(Variant::STRING, "code", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_code", "get_code");
	BIND_ENUM_CONSTANT(MODE_SPATIAL);
	BIND_ENUM_CONSTANT(MODE_CANVAS_ITEM);
	BIND_ENUM_CONSTANT(MODE_PARTICLES);
	BIND_ENUM_CONSTANT(MODE_SKY);
	BIND_ENUM_CONSTANT(MODE_FOG);
}
Shader::Shader() {