refs #17056, #17069, #17057. Fix a few problems with History pushState/popState support. Thanks Paul Christopher (CLA).