allow class inheritance fix (from https://github.com/zerobearing2/stateflow/commit/2dfa0506dcfdc1578155e831ec0ef372315899b6)