Move MSDOS COM single-byte magic number checks to last in the list.
Move advanced options flag into context structure.
Include dtd files as text type.