ensure that ul.id and anchor.id are unique