Adding a piece of doc to clarify XPath search contexts. Fixes issue 3234
Preventing possible NPE. Fixes issue 4193