Foreign investment and economic growth: Characterization of a second-best policy for welfare gains