I've been stopped when there was no probable cause, and contested. I was visiting the Golden gate Park a decade back and asked a ranger for some directions. They stopped me and my friend because "they smelled weed". We still got searched. We did not smoke and there was no way we could have smelled. We did have a still sealed container from a local dispensary that was not know in it's container, but a ziplock bag. The bar for probable cause is so low that it can be normal things (any given location in SF has high likelihood of smelling like weed). And remember, this is because I walked up to a fucking park ranger and said "hey do you have a map?" Even the second ranger protested and asked to be off record. Couldn't contest without going back to SF and that's technically federal property.
I'm just saying, I wouldn't rely on this being a sufficient safety mechanism. Abuse is rampant and difficult to prove.