minor bug fix affecting HD bitcoinj wallets

theoretically affected 1 in 3.8e15 HD wallets