Check out what he's done to it and let me know what you think.
now it identifies the Simliar-Objects not only by Entity-Type and Layernames.
It's a little bit more like the Original SelectSimliar Routine ;-)
or use code below.
Read all about it at:
(it's German, you have to translate it with Google f.e.)