Avoid some problems with weird undefined tagNames (not sure why it occurs, but this keeps it from becoming an exception)