Sounds like a bug.
You find hte JPEG by starting with a copy of the file and deleting half of the pages.
See if you found the problem. If not, delete the other half, etc., etc.
Keep cutting in half. You'll find it in log2(the number of pages).
So even if you have 1024 pages, it's only 10 steps.
Still it's a lot of extra work. I think You are right saying that it is a bug because when i closed Indesign, opened it up again (did not make any changes) it magically exported the pdf without errors. Interesting huh? So if it is some kind of a bug what can we do about it?
Well, you can report it.
If you cannot reproduce the bug, it is extremely difficult to make progress. So the first order of business is finding a reproducible test case.
The best way to report a bug is to open a support case with Adobe Supprt (http://adobe.com/go/supportportal), because then you get a bug number and followup and you can understand what is going on.
You can also fill out the form at http://adobe.com/go/wish but I would advise going through support. The wishform won't give you a bug number and I think the chances of your bug getting fixed are substantially lower as well.