Fixed the wrong "duplicated header" fatal error.

Fixed by properly localizing the variable.
Merge pull request #5 from melmothx/master

Fixed the wrong "duplicated header" fatal error.