Fix assertion failure when retrying to migrate a workflow history
When a first migration was reverted for any reason (e.g. ConflictError), the assertion failed because __setstate__ was not called yet to fix the class back to the old one.
When a first migration was reverted for any reason (e.g. ConflictError), the assertion failed because __setstate__ was not called yet to fix the class back to the old one.