Fix a subtle multiclass bug: when using class inheritance on