Growing Up with Capital Flows