Fix chicken/egg problems during migration.