Ricardo's Comparative Advantage argument was specifically derived under the condition of closed capital accounts because Ricardo himself didn't only understand but actively warned about what would happen with open capital accounts. Every time he got trotted out to rationalize the policies that deindustrialized the United States he must have been spinning in his grave.
For more, read "Trade Wars are Class Wars" by Klein and Pettis. The thesis is in the title and the case is convincing.