Fixed comparing node equality in XPath expressions

Previously this would take the text of the entire node set, not of the first
node in the set.