properly set distinct if select_values starts with DISTINCT