Maybe I'm missing something, but why does this need to be changed? Why not just always cache the HEAD request? What are we testing here, exactly, whether Varnish caches a response properly? That doesn't belong here.