Capital Inflows and Real Exchange Rate Appreciation in Latin America: The Role of External Factors