What we need is some counter-balancing force that ensures patent license prices remain reasonable. Normally that's done by the threat of substitution or inventing-around, which doesn't work when USPTO screws up and allows claiming the whole problem space. The price especially needs to be reasonable for non-profit use, which is a software-specific issue made possible because our unit costs are also basically zero. It would also help if they tested patent claims for obviousness by giving someone the problem statement and seeing if they produce a solution off the cuff covered by the same claims.
I'm not a lawyer or historian, but I suspect that protecting against independent invention may not have been the main goal of those who created the patents system. I suspect that this kind of protection may just be a side effect of assuming that it is generally impossible to tell whether or not an invention was arrived at independently and that it is generally impossible to keep the inner workings of an invention secret.
These assumptions are not true in the same way for software as for, say, the typewriter or a particular kind of elevator or even a chemical substance. That's why it may make sense to think about software patents seperately.