Use longest path and priority to decide what error to display.
Fixed bug in xpathJoin opt where WELL_XML check is not correctly handled.