`duplicated(names(x))` is simpler.