component: improve inheritance deduction