[BUGFIX beta] Still update HTML5 history if the previous state was null

Fixes #3195, Closes #3580