Improved comparison of repetitive tags like <li>, <option>, etc.