Small improvement in xsearch().