Throw useful error message for unmatched end tag