core: improving hierarchy source code

1 job for component-system in 1 minute and 18 seconds (queued for 6 seconds)
Status Name Job ID Coverage
  Build
passed build #128407

00:01:18