That's as may be, but it's a case of extreme defeasibility that really isn't applicable here. To give you another example, the classic standard for the US that I'm aware of was a guy about 15 years ago who got pulled over for having a broken tail light, and the cops found that his trunk was full off bags of Heroin. He arrested the guy, and the case was thrown out for the same reasons stated here. The dealer got off without so much as a fine (though he spent time in jail while awaiting trial). That might not seem like a good thing, considering a guy who clearly broke the law got to go free... but the alternative is a fascist police state. Either you catch lawbreakers by the rules that society has set out, or you don't catch them at all.
As long as you stay calm and don't badmouth the cop (doesn't look good in court) or anything, and maintain the whole time that you know your rights and do not condone the illegal search taking place, you're in good shape when they do something wrong. Policemen shouldn't get away with breaking the law they're supposed to enforce, that's corruption.
Unless the threadstarter is totally lying or leaving out vital info about what really happened.