Bugfix in generic DFT/FFT implementation