Fix get_active_material when a material is directly set on the mesh
Fix get_active_material when a material is directly set on the mesh

Makes MeshInstance3D::get_active_material consistent with the logic
in the rendering system.

Fixes #38108

josempans/godot,guilhermefelipecgs/godot,Valentactive/godot,honix/godot,MarianoGnu/godot,BastiaanOlij/godot,vkbsb/godot,honix/godot,honix/godot,vkbsb/godot,godotengine/godot,Paulloz/godot,firefly2442/godot,ZuBsPaCe/godot,pkowal1982/godot,Valentactive/godot,guilhermefelipecgs/godot,Shockblast/godot,josempans/godot,Zylann/godot,akien-mga/godot,ZuBsPaCe/godot,Zylann/godot,vkbsb/godot,BastiaanOlij/godot,Valentactive/godot,firefly2442/godot,vkbsb/godot,ZuBsPaCe/godot,BastiaanOlij/godot,vnen/godot,pkowal1982/godot,BastiaanOlij/godot,DmitriySalnikov/godot,sanikoyes/godot,DmitriySalnikov/godot,Zylann/godot,guilhermefelipecgs/godot,sanikoyes/godot,firefly2442/godot,Faless/godot,vkbsb/godot,vnen/godot,sanikoyes/godot,DmitriySalnikov/godot,pkowal1982/godot,godotengine/godot,akien-mga/godot,pkowal1982/godot,MarianoGnu/godot,firefly2442/godot,Faless/godot,Faless/godot,vnen/godot,MarianoGnu/godot,MarianoGnu/godot,Paulloz/godot,Faless/godot,akien-mga/godot,guilhermefelipecgs/godot,Shockblast/godot,Zylann/godot,godotengine/godot,Zylann/godot,guilhermefelipecgs/godot,vnen/godot,Faless/godot,firefly2442/godot,DmitriySalnikov/godot,Faless/godot,vnen/godot,pkowal1982/godot,firefly2442/godot,ZuBsPaCe/godot,godotengine/godot,ZuBsPaCe/godot,Zylann/godot,firefly2442/godot,Paulloz/godot,josempans/godot,godotengine/godot,vnen/godot,sanikoyes/godot,Shockblast/godot,DmitriySalnikov/godot,josempans/godot,BastiaanOlij/godot,sanikoyes/godot,Faless/godot,MarianoGnu/godot,josempans/godot,akien-mga/godot,Paulloz/godot,ZuBsPaCe/godot,josempans/godot,godotengine/godot,Valentactive/godot,pkowal1982/godot,MarianoGnu/godot,sanikoyes/godot,Shockblast/godot,vnen/godot,DmitriySalnikov/godot,ZuBsPaCe/godot,Paulloz/godot,BastiaanOlij/godot,godotengine/godot,honix/godot,firefly2442/godot,honix/godot,Valentactive/godot,ZuBsPaCe/godot,Zylann/godot,BastiaanOlij/godot,sanikoyes/godot,vnen/godot,Faless/godot,Valentactive/godot,Paulloz/godot,Valentactive/godot,Shockblast/godot,akien-mga/godot,vkbsb/godot,akien-mga/godot,Paulloz/godot,pkowal1982/godot,Zylann/godot,Shockblast/godot,honix/godot,Valentactive/godot,guilhermefelipecgs/godot,josempans/godot,guilhermefelipecgs/godot,josempans/godot,MarianoGnu/godot,BastiaanOlij/godot,vkbsb/godot,akien-mga/godot,Shockblast/godot,sanikoyes/godot,Shockblast/godot,akien-mga/godot,DmitriySalnikov/godot,vkbsb/godot,godotengine/godot,MarianoGnu/godot,guilhermefelipecgs/godot,pkowal1982/godot