Fix removing a merged property from headers and footers (#13334)

Change-Id: I1de668b73ebe0617e6100a2f8b2a84c7a94ad8a7