BUG: fixed possible infinite loop in FourDD dealiasing