Improving handling for footnoteref elements