A new theory for the negative difference effect in magnesium corrosion