system.tag.storeTagHistory() Creating duplicate IDs in sqlth_te

I've been using system.tag.storeTagHistory() to migrate some history from a different platform to ignition. The tags exist in Ignition, but the historical data that I want to store is from a period before the "creation" date of the Ignition tag.

I found that this results in duplicate entries in sqlth_te. There's the original entry, and then there's a new one with the created and retired timestamps matching the start and end of the transferred data.

Before:
image

After:
image

This is a problem because tag history queries spanning a period of time that includes the creation date will fail to bring in history from both IDs.

I can go around this by manually updating the created timestamp of the tag to an earlier date, however I need to "restart" the Tag History Provider for system.tag.storeTagHistory() to recognize the update. For one tag, doable. For 1000s of tags, quite impractical...

(By "restarting" the Tag History Provider, I mean editing it and saving it on the gateway webpage, which results in "History sink 'MyHistorianProvider' started successfully." and "Tag history tables verified successfully." entries in the log.)

Worst case scenario, I can update the creation timestamps all at once to some arbitrary date in the past, before migrating any data; or I can run a script to fix the duplicate IDs after the fact. But I'd rather not do that if I can avoid it.

My question would be:
Is there a way to get system.tag.storeTagHistory() to update the creation date rather than create a new id for the tag?
Or is there a way to "restart" or "clear the cache" on the Tag History Provider through scripting somehow?

I'd appreciate any insight/advice.

For anyone curious. This function called from the gateway scope will "restart" the history provider:

from com.inductiveautomation.ignition.gateway import IgnitionGateway

def restartHist(prov):
	context = IgnitionGateway.get()
	tagHistMan = context.getTagHistoryManager()
	tagHistProv = tagHistMan.getTagHistoryProvider(prov)
	tagHistProv.shutdown()
	tagHistProv.startup()

(Be aware that messing with the historian DB tables or SDK can seriously mess up your historian or gateway.) Use at your own risk. Don't use in production.