[views] Backport main_header monkeypatch from squareui (closes #3348088) [applied]