Viscous limits for piecewise smooth solutions to systems of conservation laws