In the balance between your Constitutional rights and the right of the police to uphold the law, the distinction between what is a legal stop and an illegal stop will turn on the specific facts of every case.  The police only need a legitimate basis to stop your vehicle and not the higher threshold of probable cause.  If they told you you were stopped because of the suspended license and you know it was baloney then you have an issue as to the subsequent search being invalid.  I would speak with an attorney in your area on the matter as soon as you possible can.  He or she needs to make various motions regarding these issues and to exclude the evidence found if need be.