....because it doesn't supply a build context to the pattern:
public void replace(Pattern<Value, Type> pattern) throws NotBuildableException {
TreeCursor<Value, Type> build = pattern.build(null, (Environment<TreeCursor<Value, Type>>) getLocalEnv());
current = current.copyAndReplaceSubtree(build);
}
Workaround: build the pattern yourself before passing it to the walker:
walker.replace(pat.build(context, env));