make compilePathExpression threadsafe