Minimal example:
<ref name="a" details="p1">content</ref> <references /> <ref name="a" details="p1">different</ref> <references />
Expected output: Two sections, both listing a main ref and a sub-ref.
Actual output: The sub-ref in the 2nd section is missing. This is because the duplicate detection is not reset between the sections and (wrongly) detects the 2nd sub-ref as a duplicate.