I may have fixed the mode issue, at least for now. Here it is, for anyone suffering a similar issue and wants to give it a try.
- Delete Routines that use the failing mode
- Remove the failing mode(s) in all smartapps that use it
- Delete the mode
- Put everything back in reverse order
This is almost identical to the procedure I described above, except this time i did not restore the settings in Routines before moving on to the other steps. YMMV.