I couldn't find any info on this despite searching, apologies if this has already been addressed.
changeDeploymentTenantId in RepositoryService doent set tenant in any of the history tables which have Tenant_id_ columns (PROCINST, ACTINST). This seems like an oversight since the database ends up in an inconsistent state. Can anyone confirm?