Consider the following:
(defun c:blockdupes ( / ent idx ins lst rtn sel )
(if (setq sel (ssget "_X" '((0 . "INSERT"))))
(progn
(setq rtn (ssadd))
(repeat (setq idx (sslength sel))
(setq ent (ssname sel (setq idx (1- idx)))
ins (cdr (assoc 10 (entget ent)))
)
(if (vl-some '(lambda ( x ) (equal ins x 1e-4)) lst)
(ssadd ent rtn)
(setq lst (cons ins lst))
)
)
(sssetfirst nil rtn)
)
)
(princ)
)
Note that the code considers blocks to be duplicate based solely on insertion point coordinates which are within 1e-4 (0.0001) units of each other, independent of block name.