Fix: Using unique(ret) or ret.reverse() requires ret to be promoted to array first