You are thinking of the "Fruit of the Poisonous Tree" doctrine.
But that is not relevant here since you said the open containers were in plain view.
Obviously, however, if you think this is spending several thousands of dollars on, then hire a lawyer.