Why does it need to flatten both the layouts?
I wrote an app note on doing this in Diva years ago (it was for 4.3.4, so that shows how long ago it was), but I never updated it for 4.4 (let alone IC6) and I can't locate the app note any more (it was probably 14 years ago...). But I can't see why you need to flatten both layouts.
If I remember rightly, I did something in Diva by the following flow (roughly):
- Place an instance of one layout and flatten it
- Change the purpose of all the shapes to a different purpose (e.g. "xor") which I added to the tech file for this purpose (excuse the pun)
- Place the instance of the second layout (no need to flatten)
- Do an xor of each drawing layer against the same layer, but xor purpose
With Assura, Dracula, PVS and Calibre it's easier because they directly support having two different databases, whereas with Diva you only have a single database, which complicates matters slightly.
I seem to remember my app note had some scripts to automate adding the purposes and building the rule deck, and then some SKILL to do the above steps - but it's not exactly difficult. If you're using one of the other physical verificatioiin tools, it's simpler still.