Fix device corruption on retried model txns.

Fixes ZEN-14590.