Not a problem. Features lose function all the time. Think Cetacean.
For those that don't know and the lurkers: The measure of evolution is not whether certain features gain or lose function but how much the change, any change, affects future ability to pass on genes. If a reduced function increases the number of successful offspring, that organism has a higher fitness and the reduced function will be retained. As long as the costs of a change are less than benefits of the change that change is an advantage.
Yes, I *knew* that.
I just didn't see an obvious change to the environment that would first favor four wings, then two.
Recall, as some other poster on this thread pointed out, that there are all kinds of concomitant changes to lungs, bones, genitalia, what have you that all seem to go together in a package in the birds.
If the same genes cover very different organs and structures, no problem.
If they don't, the process becomes more messy, or more problematic.
Full Disclosure: Yes, I already thought of the "ontogeny recapitulates philogeny" in this regard, especially with respect to formation of fingers / toes on hands and feet (webbing more or less, followed by massive cell death to "carve out" the digits).
Cheers!