Fixed a problem with Collection's `add` method that was incorrectly adding element twice when also updating some other element