I totally understand and agree with the courts. I have had hundreds of people drive by in a car with the windows up or down, really makes no difference. You can smell the odor of pot coming from that vehicle.
I have been in front of plenty of doors trying to speak with someone for what ever reason and smell the drugs.
The problem is going to be when the cop "thinks he smells an illegal substance". This is going to be a tough one for you to argue because cops don't lie, right?