Based on the example, the suggestion was correct and the data doctor did what is correct. The way it was written is incorrect.
==Children==<ref>Rev. John Cornell, Genealogy of the Cornell Family, being an account of the Descendants of Thomas Cornell of Portsmouth, RI, New York 1902; p 17</ref>
This is not recognised as a heading. It is rendered as
Beuests to daughters Elizabet and Mary. The will disposes of a considerable amount of plate. (Original will among unrecorded papers at Portsmouth Town House.)
==Children==
[17]
- Richard Cornell Born: About 1628, Saffron Walden, Essex, England ⇒
- Sarah Cornell Born: About 30 March 1623, Saffron Walden, Essex, England ⇒
and Children does not become a heading and is not in TOC. To make inline reference a part of heading, you would need to do it like
==Children<ref>Rev. John Cornell, Genealogy of the Cornell Family, being an account of the Descendants of Thomas Cornell of Portsmouth, RI, New York 1902; p 17</ref>==
and that would render to
- Richard Cornell Born: About 1628, Saffron Walden, Essex, England ⇒
which would be kind of correct, but again, I don-t recommend using inline citation or images or templates in Headings. That creates huge URLs for linking to section Like
https://www.wikitree.com/wiki/Briggs-237#Last_Will_.26_Testament.07UNIQ363fdaf650b583c3-nowiki-00000031-QINU.0716.07UNIQ363fdaf650b583c3-nowiki-00000032-QINU.07
for the previous heading.