Fix the bug with corrupted search context value "ctx" while during xpath search

avoiding bad syntax in case of context is empty string
Merge pull request #2544 from vgrigoruk/master

Fix the bug with corrupted search context value "ctx" while during xpath...