Correct history handling for transitioning between detail and list view