uniqueness of idx is ensured, even when adding a new node