Set the heuristic to a low value at end of path

Specifically 0 for target mismatch, and 1 at any stopping condition.
Without this, guidance will sometimes prefer a dead-end area of the
search space that's a few bad branches beyond a very appealing state.