factors out undoMacroExpansion into a standalone undoDesugarings utility