Fix bug aborting popstate

I hit the bug reported in this issue #5210 a few days ago. 

tl;dr
When you hit the back button and the transition is aborted, the url has already been updated is not rollbacked.

I've managed to fix it, but I have no clue about how to test it, because I would involve set some routes and play with the history. Seems almost an acceptance test to me.