Yes this is the most difficult part, making sure you don't take the donor
colony's queen by mistake! I usually look for her, and once found, set her
comb in a nuc box until I am done taking the brood and bees I want for a
split.
This is, admittedly, time-consuming and tricky. Eventually you get to the
point where you are just looking at the combs you pull to ascertain the
ABSENCE of the queen on them. A quick double check and you can be fairly
certain you don't accidently take her away.
I wish there were some way to "mark" the queen so that you could find her
location in the hive quickly with a sensing device. Oh well, maybe
someday. Radioactive tagging or something! :-) Later...
JWG