Maintenance of Software Is a High-Status Position
The way past this problem is to take a leaf out of the free software/Open Source world. Make being the maintainer of an application a high-status position, and then reward longevity of service.
Think for a minute about all of the money that has been wasted over the years on rewriting legacy applications. Surely a much better solution would have been to attract experienced, talented developers into maintaining these mission-critical applications so that they didn't need to be rewritten in the first place? Yes, that would mean that we would have to stop making jokes about maintenance programmers, and we would still have to teach COBOL, but at least it would prevent us from getting sucked in by the hype surrounding new tools and technologies.
I've lost count of the number of organizations that have nearly crashed and burned on a Java project in a failing attempt to replace a legacy system. The reality is that only recently have Java tools attained the stability and robustness that legacy mainframe developers used to be able to take for granted.
Length of service is a very important factor because the reality is that software doesn't wear out. Many urgent legacy replacements have only become necessary because of how badly the application has been maintained, or because a vendor decided that a platform is no longer "strategic."
In recent years, many minicomputer vendors have decided to stop supporting their older machines and operating systems, leaving many organizations with no option but to rewrite applications. No wonder the free software/Open Source model is becoming attractivethere's a lot less chance that a platform will be declared no longer strategic.