diracdec: check wavelet depth, prevent out of array read.