Fixed batch add issues where an entity self-links.