[mcs] Emit correct assignment to ref pointer