running() maybe returns wrong value when multiple matches on one page
I am attempting to typeset a Bible, and would like to show the chapter number at the top of each page. This seems to work most of the time. However, when there are multiple chapter numbers (the big, left-floated numbers) on one page, the value of running() on the following page seems to be wrong. See, for example, the attached screenshot, from the attached HTML rendered in Firefox, where I would expect the running chapter number on the second page to be 5, not 4.
Is this a bug, or am I misunderstanding the expected behaviour?