The Effect of Concentration Gradients on the Stability of Amorphous Layers of Ternary Alloys