Following the discussion "Header Tabs sometime fails to load" : https://www.mediawiki.org/wiki/Extension_talk:Header_Tabs
It seems that the solution is to wrap the OO.ui.infuse js function in the file ext.headertabs.core.js with the ready hook to wait for the DOM to be fully loaded:
$( d ).ready(function() {
var tabs = OO.ui.infuse( $( '.mw-tabs' ) );
});
Can this be added to master and REL1_39 ?