If you are, like I was, getting the error message "TOC entry has incorrect nesting level" when you try to export from InDesign to EPUB, try this.
This seems to be an error in the hierarchy of TOC style levels and probably means you've got a lower level item listed before the higher level of which it is a sub-part. For example, I seemed to have a style I called "section headline" coming up before any of my "Part"s or "Chapter"s. So how to find it?
First, you need to know which style is causing the issue. I created a new TOC style called "EPUB TOC troubleshoot" and one-by-one added in the TOC styles I wanted to include from the highest level down, exporting to EPUB after each one until I got the error message.
Once you know which style is nested incorrectly, now you need to hunt down where it's out of the hierarchy. In InDesign CS6, go to Edit > Find/Change (or hit command or control F). Use the little icon beside the 'Find What' box to set it to look for Wildcards > Any Character. Us the little icon beside the 'Find Format' box to set it to look for Style Options > Paragraph Styles > [whatever your offending style seems to be].
You know what mine was? The section headline on the print version's table of contents page. Ha! I created a new style from that named "section headline TOC" so that it would be separated from the rest of the section headlines in the book which I wanted to use for my EPUB TOC and then, hooray! I exported without an error. Phew.