Computational quantification and correction of the errors induced by layer removal for subsurface residual stress measurements