I left one crucial detail out. My concern was the fact that the original headers list being wrapped ('list' in my example) is not being updated.