more efficiently stores labels instead of transitions in FSM validity check