rm_tail now updates head if needed