Something changed in the wordpress plugin that I use to create my cookbook ebook from the recipes on my blog. This change exacerbated a known issue, and in the process, completely borked my wordpress installation to the point where the only workable option (besides manually deleting 4910 duplicated, broken media library entries) was to restore from a backup.
The good news is that I keep a rolling month of daily backups. The bad news is that I’d never tested the restore procedure (I know, I know).
Happiness is a working restored backup.