Fix TTC header handling

Also change the Version type to avoid similar bugs in the future.

Reported by Grigori Goronzy.
3 files changed