TagParser: consider close tags