(#2818) - compaction removes orphaned attachments