fix: check uniqueness against deleted objects