Different order in tabs and DOM
In some case, the order of the tabs list and the DOM can not be the same. This is because the tabs is filled on registration and the DOM is modified after the view promises is resolved.
This can be reproduced by opening an URL on a new tab with a user having some default action set. The openings of both tabs are concurrent so the list and DOM may be incoherent.
The problem is that get_current relies on both sources to be coherent.