Reset the headend array when looping.