Recalculate tabbar line at top when programmatically removing an element?

I have a tabbar with 3 icons on it.
Some users, when logged in, will only have access to 2 of them, so I remove the middle one.

I do this with
$('#tab-element).remove();

This causes (on material design) for the top blue highlight bar to be misaligned.
How can I force the top bar to recalculate to the correct width?

there is a app.toolbar.setHighlight(tabbarEl) method Toolbar / Tabbar | Framework7 Documentation