<$pagecount> not correct on automatically injected blank pages

I’m using Scrivener v3.1.3 (11945) for the Mac. The formatting of the document was set to start new sections on “recto” pages. The placeholder <$p> of <$pagecount> was included in the header definition for all pages. Pages containing user text printed correctly, but the pages that were automatically inserted to begin a section on a “recto” page contained something like the following: 2 of 9223372036854775814

I’ve reported it as a bug. Does anone have a work-around?