For the love of god this is extremely frustrating. I have been searching for literally hours trying to find the solution.
I have a large document, linked frames from page 1 through page 44 for example.
On many pages I have figures, and using an incrementing paragraph style, these figure captions are numbered sequentially.
When generating a table of contents, any figures that are in the main linked frames are created in the proper order.
My issue is that on a few pages, I have figures inside anchored objects - basically an anchored text frame with a picture and the figure label text using my paragraph style.
These anchored objects are not being put in the table of contents in the proper order - they are being added to the end of the toc! Indesign should be smart enough to add items on the page in the proper order - be it the main frame or an anchored one!