Defend against empty themes when rewriting commands.