fix: `grind` canonicalizer state management (#6649)

This PR fixes a bug in the term canonicalizer used in the `grind`
tactic.
4 files changed