Fix checking for same type or derived from type in new css selector class