Dealing with the Challenges of Capital Inflows in the Context of Macrofinancial Links