Police charge someone with an offence. Police then use that charge as grounds to obtain a search warrant. Later on during court proceedings the charge is dismissed due to insufficient evidence as part of a plea agreement. If there was insufficient evidence to proceed to trial does that mean there was insufficient evidence to charge that person with the offence used to obtain the search warrant ? Would this make the search warrant invalid ?