Fix cached headers being added when they should be set.