If you add a TOC and index to your front/end matter chapters, close the chapters, and add/edit/delete headings and index marks elsewhere in the Book, there's no way to know the TOC or index is outdated or to update them without opening the front or end matter chapters again.
With similar features such as notes, lists, cross references, and page numbers, there are Update Before Output commands but there aren't similar options for the TOC and Index. And because you can't preflight closed chapters, users must open their Front Matter and End Matter chapters to see if the TOC and index are outdated and update them on their own.
I don't now if this is a bug or a feature request, but it seems like an oversight.