Replace up links with trail of all parents.