Fix: set_difference requires sorted input.