source : https://bitcointalk.org/index.php?topic=178657 using: 0.8.1 (same in 0.7.1) wallet.dat: old wallet created in 0.3.22 never explicitly upgraded.
bitcoind accepts to use this wallet without warning, which is what I expect.
but then, getaddressesbyaccount "", lists bunch of addresses some of which I have the private keys, BUT SOME OF WHICH I DON'T (in fact it lists addresses to which I sent btcs from this wallet in the past).
I sent 10 btcs from vircurex to an old bitcointorrentz address which was somehow listed as my own address in my wallet, because of this.
I suggest that getaddressesbyaccount actually verify that the wallet contains the private key before listing the address. I can't imagine the other behaviour being desirable.
I hope this is useful. unfortunately I can't provide my wallet (and can't produce an empty wallet corrupted the same way), but I'll be happy to verify something if you need me to. just respond to my forum post above or pm me.