Fix some issues with the order of desugaring passes