It is like the genie (Robin Williams) in the animated film Aladdin http://en.wikipedia.org/wiki/Aladdin_(1992_film)
Quote from http://www.imdb.com/title/tt0103639/quotes
--------
Aladdin: You're a prisoner?
Genie: It's all part and parcel, the whole "genie gig":
[grows to a gigantic size]
Genie: Phenomenal cosmic powers!
[shrinks down inside the lamp]
Genie: Itty-bitty living space!
--------
As an irreplaceable cog, you may have "phenomenal" earning power, but you get trapped in a small (employment) space.
Someone who speaks fluent HTML, CSS, JS, PHP, Perl, Python, MySQL, Oracle and god knows what else is a lot harder to hire than someone who knows C# and Oracle. I'm not talking about trivial "I've heard of it" knowledge, I mean working knowledge. These guys are rare and very hard to replace.
I've seen too many back-end programmers who think they know js and css; they understand most of the syntax, but not the patterns in place, what wheels exist already, what libraries to use, or the quirks in the current implementations. Some don't really know the DOM, others don't really understand cascading. Sure they can make something that looks good in the latest Firefox, but when you open it in IE 6 or 7 you're screwed.
Example: Did you know you can't have a JavaScript variable that shares a name with a form element? Do you know why?
Yeah, but what does Google not know? ;0รพ
As far as the tech is concerned, you need to balance depth and breadth. I think this is easier to do in the open source world. I shudder to think what my career would have been like if I had got stuck with MS tech early. Being a web developer helps as well, because there are so many layers there that swapping one out at a time never involves too much of a learning curve. If you are well-versed in HTTP, HTML, CSS and Javascript you will still run circles around someone who just knows one language and some framework.
on the contrary, specialization is how you get to be more than a trivially replaceable cog in the machine.