If close tag cannot be matched, add it as text node