I have a large document (90 pages) that has 7 sections with section titles with a specific paragraph style. I defined the header variable and inserted it on the master spread - on the left and right page. The section title appears on the both the left and right pages of the first section. When it gets to the 2nd section, it changes to the new title on the first page but remains with the previous section title for the rest of the pages.

The directions say "If there is no occurrence of the style on the page, the previous occurrence of the applied style is used." However, it goes back to the orignial occurrence instead of the previous one.

I've seen something similar to this previously, and it turned out to be a problem of some sort with the text itself, though we never managed to "see" what the problem was. I eventually identified where it was by cutting sections of text until it worked correctly (play with a copy). The solution we used at that time was to export that part of the text ro InDesign Tagged text, delete the bad section, then place the tagged text.