Fix cloning of primitives that have different material assigned in code
Fix cloning of primitives that have different material assigned in code

playcanvas/engine,playcanvas/engine,guycalledfrank/engine,sereepap2029/playcanvas,aidinabedi/playcanvas-engine,H1Gdev/engine,H1Gdev/engine,sereepap2029/playcanvas,MicroWorldwide/PlayCanvas,sereepap2029/playcanvas,aidinabedi/playcanvas-engine,MicroWorldwide/PlayCanvas,guycalledfrank/engine