Rework MOUNTED/DOING SOFTDEP/SUJ macros
(cherry picked from commit 7f682bdcabdaf95ded6a69994344ddbc84fd36db)