By the way, in the meantime I've managed to solve my problem. Here's how:
- Used "pywallet --dumpwallet" on my backed-up wallet to get a list of private keys.
- Deleted the wallet and started Bitcoin-qt. This created a fresh wallet.
- Wrote a shell script to iterate through all the old private keys and import them using "bitcoind importprivkey account rescan=false"
- Restarted Bitcoin-qt with rescan option
Step 3 was key: initially I tried importing also using pywallet. However, Bitcoin-qt was then unable to read the wallet. The solution was to use bitcoind itself to import the private keys!