Clone the link so attributes are not altered - Fix #399