Influence of residual stresses on the mechanical properties of a layered composite.