Corrects bug with xPath selector if node is the top level element