Fix issue #1449 by collecting the prefix_header_contents and uniq-ing them.