Fix incorrect check for unknown tag
Revert accidental changes to index