Fixed calculation error in WaveletMatrix::rankAll()