Fix validation checking logic

Previously the logic let through tags which didn't appear in the
validation blocks.