Never mind, I found it. Somewhere down the line all unused themes lines were no longer in config.php, only in config_default.php. Strange, I don't recall changing anything about that. Perhaps SM is no longer looking for the default config when a local one is set?
I changed nothing for SquirrelMail in between the last php changes. Triple checked all theme related entries in all config files, even permissions of the themes files, nothing changed in or for these files. Also nothing changed in load_prefs.php, so that can't be it. Visually nothing changed either, not even when using a fresh/private browser, so it's still loading the custom theme the way it should. Seems to me php is messing something up.
PHP error