Swap head/tail on "up" links

Previous change for #1824 ended up with head/tail labels on the wrong ends