Magnesium thin films covered with a layer of Pd absorb hydrogen at much higher pressures than bulk Mg. Such an effect was originally explained as a consequence of elastic clamping on Mg by the capping Pd layer. An alternative interpretation later suggested that the pressure increase could originate from simple alloying between Mg and Pd. Here we resolve this controversy by measuring the hydrogenation and dehydrogenation isotherms of Mg-Pd thin film alloys over a wide range of compositions. Our results disentangle the effects of elastic clamping and alloying and highlight the role of plastic deformations.