Save state on a per-tab basis and properly update the state of the button even if the headers are in a different order