Use ID if available and if node identity is equal to tagName