Fix how navigationMenu hook finds the next available id.