When using list-defined references and displaying the reference list with #tag:references (as with the reflist template on the English Wikipedia), and if the ref tag is capitalized in any manner (Ref, REF, reF, etc.) then an extra backlink is created that does not have a matching anchor.
Markup:
<ref name=foo/> {{#tag:references|<Ref name=foo>Reference 1</ref>}}
See Template talk:Reflist#Capitalized <ref> causes extra backlink.
I tried this with <gallery> and a few other tags and did not see any issues.
Version: unspecified
Severity: minor