House keeping.
Patch to handle meshes with just one material.