Beginning of MIR transformation to simplify box/unbox pairs.