See this test at nl.wiki.
All I did was changing the word at line 43.
VE replaced the template at the top with another one which was already in the article, therefore duplicating it.
Description
Description
Event Timeline
Comment Actions
I made this change,
https://nl.wikipedia.org/w/index.php?title=Sjabloon%3AZie_artikel&diff=43710077&oldid=42670382
Now we wait for restbase to update. In general, the above patch should help these cases.
Comment Actions
id affects only data-parsoid and templates are serialized with data-mw .. and I had to scratch my head for a second before being convinced this is an id issue. Selective serialization uses dsr information which is present in data-parsoid. So yes, this is related to duplicate ids.