Remove redundant mangling code.

This continues the factorization started in 28b2297091851a398cffabfbf64d120e2b5c8a3a.