Illegal table of contents -- <li> inside <li>

For my current book, Scrivener is generating an illegal table of contents in ePub. It has

  • tags inside
  • tags. For example,

  • Methods
  • I have used Copy Documents As Structured Linked List, I have Generate HTML Table of Contents checked,
    I have tried it with and without Use Flat Table Of Contents checked; that doesn’t seem to make any difference.
    I have added or not added a blank line in two places; that doesn’t seem to make any difference.
    I would think this is a bug in Scrivener, but I have not had this problem before, so it’s probably something I am doing wrong.

    The illegal ToC is attached.

    Suggestions?
    david.matuszek@gmail.com