It's very common. In France, for example, there are several minimum sentences with the possibility of exemptions in exceptional circumstances.
If you read the Supreme Court decisions in R. v. Nur and R. v. Lloyd, you will see that the Court sent very clear signals in favour of creating possibilities for exemptions in exceptional circumstances.