The best way to close the loophole is to replace taxes on corporate profits with an increase on the dividend tax. This will make it impossible for any American CEO to get out of paying taxes without renouncing his own citizenship.
Will it discourage payment of dividends? It would to the extend that a personal income tax discourages working. People still work in spite of the income tax; corporations will still pay dividends even if there is a tax increase on them. A upside to this is that companies will have an increase incentive to reinvest their profits and pay off debt.