Fixes #395 - ThisShouldNotHappenError when using path expressions in predicates for certain patterns
Merge pull request #420 from systay/395

Fixes #395