Don't assume `doc` is the doc in percolate().