Fix missing tail/head assignment in swap_*