Fix bad uses of mutex causing deadlocks
Fix bad uses of mutex causing deadlocks

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