### Godot version

v4.0.beta.custom_build [9f1fe0895]

### System information

Fedora 36

### Issue description

Opening scenes with a sky panorama and any ReflectionProbes print "test" over a hundred times, as well as a few hundred varied error messages for each probe in the scene. Toggling visibility of the probes off and on again prints the errors again.
Everything seems to still render correctly, as far as I can tell.
Regression from #70253.

### Steps to reproduce

Open a scene with a sky panorama and a reflection probe.

### Minimal reproduction project

https://github.com/godotengine/godot-demo-projects/tree/4.0-dev/3d/platformer
spec_constants.push_back(sc);
	scene_shader.set_default_specialization_constants(spec_constants);
	base_uniforms_changed(); 
}
RenderForwardClustered::RenderForwardClustered() {
	singleton = this;
	
	{
		String defines;
		defines += "\n#define MAX_ROUGHNESS_LOD " + itos(get_roughness_layers() - 1) + ".0\n";
		if (is_using_radiance_cubemap_array()) {
			defines += "\n#define USE_RADIANCE_CUBEMAP_ARRAY \n";
		}
		defines += "\n#define SDFGI_OCT_SIZE " + itos(gi.sdfgi_get_lightprobe_octahedron_size()) + "\n";
		defines += "\n#define MAX_DIRECTIONAL_LIGHT_DATA_STRUCTS " + itos(MAX_DIRECTIONAL_LIGHTS) + "\n";
		{
			
			scene_state.max_lightmaps = MAX_LIGHTMAPS;
			defines += "\n#define MAX_LIGHTMAP_TEXTURES " + itos(scene_state.max_lightmaps) + "\n";
			defines += "\n#define MAX_LIGHTMAPS " + itos(scene_state.max_lightmaps) + "\n";
			scene_state.lightmap_buffer = RD::get_singleton()->storage_buffer_create(sizeof(LightmapData) * scene_state.max_lightmaps);
		}
		{
			
			scene_state.max_lightmap_captures = 2048;
			scene_state.lightmap_captures = memnew_arr(LightmapCaptureData, scene_state.max_lightmap_captures);
			scene_state.lightmap_capture_buffer = RD::get_singleton()->storage_buffer_create(sizeof(LightmapCaptureData) * scene_state.max_lightmap_captures);
		}
		{
			defines += "\n#define MATERIAL_UNIFORM_SET " + itos(MATERIAL_UNIFORM_SET) + "\n";