fix crash when a material is never used for MG mode
fix crash when a material is never used for MG mode

mit-crpg/openmc,johnnyliu27/openmc,liangjg/openmc,amandalund/openmc,paulromano/openmc,wbinventor/openmc,smharper/openmc,mit-crpg/openmc,smharper/openmc,walshjon/openmc,shikhar413/openmc,johnnyliu27/openmc,liangjg/openmc,paulromano/openmc,johnnyliu27/openmc,wbinventor/openmc,smharper/openmc,mit-crpg/openmc,liangjg/openmc,amandalund/openmc,shikhar413/openmc,paulromano/openmc,amandalund/openmc,liangjg/openmc,johnnyliu27/openmc,wbinventor/openmc,wbinventor/openmc,smharper/openmc,mit-crpg/openmc,shikhar413/openmc,paulromano/openmc,walshjon/openmc,shikhar413/openmc,amandalund/openmc,walshjon/openmc,walshjon/openmc