Remove the use of Piecewise.subs().

Adapt tests accordingly.