NamedMaterialMgr should return const material pointers because otherwise the internal database might get corrupted.