Does this happen often?
As always, use your best judgement rather than blindly following rules. This is also why cops, prosecutors, judges, and juries have discretion about applying the law, because the law simply cannot be blindly applied.
(Which is why I object to mandatory sentencing laws.)