Update: strangely, I find that my custom themes have all been corrupted in the same way, with an erroneous line just before the end. Correcting that removed the error with all those themes.
The error persists with the default theme.
The error persists with the default theme.