Remove dubious transmutes, duplicate code from std instead.