We tell Canadians before they leave the country that when they are in another country they are subject to the legal system of that country. It is the same thing in Canada. When foreign nationals arrive in our country, if they commit theft or drive under the influence of alcohol, for example, they are subject to Canadian law.
We try to explain that the legal system of Mexico, for example, is very different from ours. When people are in another country, they are subject to the laws of that country. What we can do is use the methods we are provided by the Vienna Convention to get access to Canadians detained abroad. It is not always possible to do that, particularly if the person in question has the citizenship of the country where they are imprisoned. If a person entered that country using the passport of their other citizenship, that is, a passport other than a Canadian passport, that tells the local authorities that the person agrees that they still have obligations, still have close ties with that country.