It's not a problem. We have many such extraterritorial offences.
Of course, Rosalind mentioned the child sex laws, which are extraterritorial, but there's also torture, hijacking, certain terroristic offences, attacks on internationally protected persons, and offences involving the nuclear trade—plutonium and that kind of thing. In all of those cases you've at least got some or even maybe total invocation of universal jurisdiction, which hypothetically can lead to the sort of conflict with other countries wishing to prosecute that you raise.
That being said, in reality, it is not a frequent issue. We have enough experience with that type of situation to know how to resolve this conflict.