Add test for repeated failed model saves state

Fixes #1764.