Fixes crash with array being mutated whilst being enumerated.
Merge branch 'fix/headers_crash' into develop