Fix a few glitches in the history.back() behavior. Fixes #88