navigator: Avoid duplicate pages next to each other in history

Fixes #2052