I can definitely see how this force works against generalist programmers. I can definitely see how the market limits the shelf life of a generalist programmer.
So specialize in something where those years of experience accrue to your benefit. 10 years of image processing experience will make you an industry thought leader, as would 10 years of cryptography or 10 years of compiler backend design. We aren't running out of applications in these fields.
I can definitely see how this force works against generalist programmers.
Come on now, what basis do you have to say that someone who is a generalist is unable to provide value to people through the software they write? Do people need to be excessively specialized to make something people will pay money for?
And for that matter, I could see the generalist programmer fairing better, because they don't lose the general theory things are based on while diving incredibly deeply into a narrow body of very specific knowledge. If the job/labor/consumer/whatever market presents some new area of need, they're in a better position to go learn and capitalize on it.