I can't quote examples but serious crime cases have been dismissed for minor technicalities. You only have to look at drink driving cases.
Back on topic. If a clever enough person can expose a defect in the law fair play to them. I once lost a case because someone was smart enough to point out that if a double yellow line is broken at all it invalidates the whole section. Lesson learned and defect was fixed the next week.