Every time an object gets exported, there's a new UV layout added. For simplicity and clarity, the script should reuse the old UV layout. To prevent unwanted edits, it could check that the user has not changed the generated layout by hand.
I solved this another way: the UV layout won't get saved unless you explicitly request that. I believe it is a more cleaner approach to the same issue.
Every time an object gets exported, there's a new UV layout added. For simplicity and clarity, the script should reuse the old UV layout. To prevent unwanted edits, it could check that the user has not changed the generated layout by hand.