@kovidgoyal: Happy to help
Since EXTH 129 (KF8 Cover URI) was mentioned earlier, I took a closer look, and it seems to always point to the thumbnail... That might explain why the automatic custom thumbnail generation on the Touch was broken... (or not, it looks like a bit of a mess, I've actually seen it try to get it directly from Amazon via HTTP in the system logs...)
Tiny patch to test this theory
(I haven't checked further than making sure it was applied, and didn't make the conversion process implode, I'll test my Touch theory tomorrow...).
On a sidenote: KindleGen seems to use KF8 resources (images/fonts) count (125) / KF8 unknown count (131) the other way around than Calibre... (say, 0 image/fonts & 10 unknown with Kindlegen vs. 10 image/fonts & 0 unkown with Calibre when converting the exact same thing). :?
EDIT: On the other hand, I have a book built with KG where thumboffset is larger than both those fields... I'm starting to get what you meant by the hair pulling comment... ;D
EDITē: Fixed patch, refs are base32, not base16
EDIT^3: Killed deprecated attachments. Fix merged upstream.