The root theme should be executed first when we execute the theme alter hook.
so \Drupal\Core\Theme\ThemeManager::alterForTheme line 431:
foreach ($theme->getBaseThemes() as $base) {
Should be changed to:
foreach (array_reverse($theme->getBaseThemes()) as $base) {