[Core] Fix bug in header processing. Header variables are allowed to have underscores, but not main page names