cad/magic: Remove unintended parts of the patch
(cherry picked from commit ff0f94260bce8568b76d512bb8c622abd203131e)