anchor.diff:         FSMState1 = evaluate_comm_transition(X, PrevIndex, FSMState),
          evaluate_block(XS, RunningID, EndIndex, FSMState1, MonitorState);
        not IsCommAction ->
  +       ScopeEndIndex = RunningID + instruction_size(X) + 1,
          {FSMState1, MonitorState1} =
  -         evaluate_scope(X, PrevIndex, FSMState, MonitorState),
  -       evaluate_block(XS, get_running_id(FSMState1), EndIndex,
  -                      FSMState1, MonitorState1)
  +         evaluate_scope(X, PrevIndex, ScopeEndIndex, FSMState, MonitorState),
  +       FSMState2 = add_state(standard_state(), FSMState1),
  +       % PrevIndex here: end index of the scope.
  +       evaluate_block(XS, ScopeEndIndex, EndIndex,
  +                      FSMState2, MonitorState1)
     end.
   
   
  
positive.code:        FSMState1 = add_comm_transition(X, PrevIndex, EndIndex, FSMState),
         {FSMState1, MonitorState};
       not IsCommAction ->
         evaluate_scope(X, PrevIndex, FSMState, MonitorState)
    end;
  evaluate_block([X|XS], PrevIndex, EndIndex, FSMState, MonitorState) ->
    IsCommAction = is_comm_action(X),
  
negative.code: instruction_size({choice, _, Choices}) ->
    % Final transition in the choice block goes to the end index
    BasicSize = lists:foldl(fun(ChoiceBlock, Sum) -> Sum + (block_size(ChoiceBlock) - 1) end, 0, Choices),
    BasicSize;
  instruction_size({rec, _, Block}) -> 1 + block_size(Block);
  instruction_size({par, _ParallelBlocks}) -> 1; % Nested FSMs have their own internal numbering system
  instruction_size({local_interruptible, _, InterruptibleBlock, _}) -> % Not supported.
  