magic-elimination.patch from patch #6230.