This looks a bit dicey to me. Could this search be expressed with a regular `TreeAccumulator`, customized to prune based on positions?