if you have a document with different headings under which you find always the same sub-headings, the anchor will
always point to the first subhead.
A Document like that: (add some more so you get a toc ;-)
click anchor for the second 'bar' in the TOC; you'll be sent to the anchor #bar1
click edit for 'blarg'
you will now be on
which is wrong.
What template are you using?
This is known behaviour. All the anchors should be working, but after the section editing, you will jump to the first of those same headlines.
Unfortunately I cannot find the old bug report with the link to the explanation... Also, there has been some work on it recently, so something might have changed?