Fixing generation of XPath for search contexts that don't implement
FindsById. Fixes issue 5514