The current interval counting math includes the two following issues:
- The Super Block (and Fpm0 when using Fpm1) are included in the block count, even though they don't have associated free page maps
- When calculating the number of existing free page maps, we should divide by block size + 1, to include the FPMs associated with the blocks
This error only occurs when the total number of blocks present is within 1 (up or down) of a multiple of 4096, so it's pretty rare. Mine was hitting right at 12289.
I'm 90% sure this is the correct fix for this, but if anyone can point out a better place I'm happy to poke around some more.