Control the number of times a change can be retried.

Fixes #93.