Why make things more complex, KISS (Keep It Simple, Stupid) is a good principle to design security software. And when dealing with money, the more code there is the more space there is for bugs to sneak in. Write a separate utility for merging wallets. You never see a Ferrari with a sink plumbed in to it for some drivers who may wish to wash their hands once a year.
Merging two or more wallet.dat files, by grabbing their private keys as input and spewing all private keys out into a new merged wallet.dat file. A separate utility would be safer, if something when wrong (power failure) you would still have all your original unmodified wallet.dat files.
I agree with Salzgitter - perfect example of KISS, why reinvent the wheel.