We've solved it for the section ID, but there are elements inside the section that have IDs on them. For example, a topic may have a table in it, and the table may have an ID. When the topic is used twice in the same namespace the section ID is rewritten to a unique ID, but the table ID is not. The workaround in the meantime is to not put an ID on an element within a section (within a topic).
Fixed. Now when processing the topics the builder will parse the entire XML data and append to the id a number (this is done before topic injection so that the injected id's are messed up). For the first topic that is a duplicated the id will be left as it originally is incase the id is used as a link. For every ID after that it adds the suffix "-<number>" where <number> is a counter starting from 1. This should not break any links in the content spec and it should also allow id's to be used within a topic that is duplicated.