Of course, to some degree the risk of layoff is present in both corporate IT and consulting positions. When thinking about your ability to survive a downturn, you really have to think about what kind of network you will develop.
When you work in corporate IT, unless you're very good about meeting people in other vertical markets with different kinds of IT folks, you'll tend to have a network of folks who mostly work at the same company as you. This isn't a bad thingcorporate IT people should indeed build a large internal network. However, unless you make a special effort, you may not be building a network outside your particular company or industry.
In contrast, the nature of their job gives technology consultants a built-in advantage: Because they work with people in different companies, they tend to build a more diverse network. Consider: A corporate IT employee who jumps from company to company every nine months is a job-hopper who should be avoided; a consultant who jumps to a new client every nine months is getting exposure to different industries. The consultant is also learning different sets of jargon, building different types of relationships, and developing a stronger network in case the consulting company fails and the consultant ends up looking for work.