Simplify testing for pathPattern and keyPath equality per segiddins' suggestion.