Fix duplicating of elements when uploading two elements of same name.