Add code for a uniquify pass

Turns out that it is unnecessary, the problem is that the inliner in
SimplifyRich will inline copies of the same function.