Make sure we account for a possible exception in the begin_modify function