Added lock to SimpleRepository::Migrate<t>().