Isn't header essentially unordered? What's the point of sorting by header.index?