Remove usages of alpm_list_next() in backend