Effect of sharp concentration gradients on the stability of a two-component amorphous layer obtained by solid state reaction