Updated msSDELayerFreeItemInfo() to make sure the layerinfo struct is allocated before freeing. (#4521/#4700)