mmm the uid does not depend on the icon src, therefore if the icon src changes, we won't update it here.

I think that you should check that the src changed, and if yes, remove the old one, and go on as if it was not there.