Don't use global var for inheritance check