What measures do governments take to prevent foreign companies from acting as middle men to bypass their trade embargoes/sanctions? Example: Let's say the US makes it illegal to sell cell phones to Iran. Maybe France has no such sanction against Iran. A French supplier buys the cell phones from the old American supplier and ships them to Iran, effectively making the sanction useless. The only difference is that now the French company gains some business and the US and Iran may each have a slightly worse price.
What do governments do to prevent this from ruining their sanctions? Do other circumstances prevent this from happening?