When processing the elements, store in two maps those that contain an href="#Something" and those with name="Something" then once we've processed them all, go over the first map trying to find itself in the second
BUGS: 421163