Consider an emergency landing, where you still have a choice on where to touch down.....Are there situations where you would want to make an emergency landing, but decide to make it outside of that country?
....... I was wondering if the problem would affect commercial flights, too. I imagine that you might not want to touch down in Syria, for example, but you'd probably not be routed through that airspace in the first place?
I don't want to give concrete examples but certainly some companies will provide crews with a list of "if you can, divert there, rather than there". It is also worth pointing the rules might vary from flight to flight, perhaps depending on the country of departure/destination of the flight and/or the likely nationalities you are carrying...
You will sometimes overfly countries that are on your " don't land here" list but there is then usually a caveat that in dire emergency you'll go to nearest concrete and argue the politics when you are on the ground.