More robust retry mechanism for regenerate.