CB-5967 Fix isTopLevelNavigation not being set correctly in rare cases.