Fix bug and write tests for quick successive calls to navigate cause errors

Quick successive calls to navigate() were causing unexpected behavior
when async operations completed.