Get rid of prone to error map relating material name and index.