Corrected extend to look only at witness rather than text results; this can dramatically improve performance.