proofs: Properly track pre- and post-rewrites in bbAtom(). (#7147)