As detailed on https://pvs-studio.com/en/blog/posts/cpp/0771/ and raised on D62583, the SecNo++increment is not guaranteed to occur before the second use of SecNo in the same addSection() call.
This patch pulls out the increment and adjusts the second use of SecNo accordingly.
This change is irrelevant to the issue.