One day, I would like to see these special cases pulled out into mod-level code where they belong.  That's well outside the scope of this pr, however.