Cache XPath and JsonPath expressions, close #1061
Check failure must set Session to failed