Use separate header ID map local variables and logic for primary and secondary headers
Merge pull request #1133 from jhinkey/number-headers-master

Number headers - master