Make indexing work correctly with headers.