Fixed ToHeaderId() to use the canonical string, not the original field name

Probably fixes the root cause of issue #6