Regulatory risk, vertical integration, and upstream investment