anchor.diff:  
   replace_set(StreamId, Stream, StreamSet) ->
       OldStream = lists:keyfind(StreamId, 2, StreamSet#stream_set.active),
  -    OldType = element(1, OldStream),
  -    NewType = element(1, Stream),
  +    OldType = type(OldStream),
  +    NewType = type(Stream),
   
       NewSet =
           StreamSet#stream_set{
  
positive.code:                },
      {Closed, replace(Closed, Streams)}.
  
  %% the false clause is here as an artifact of us using a simple
  %% lists:keyfind
  notify_pid(false) -> undefined;
  
negative.code:               Streams :: streams()) ->
                       streams().
  replace(Stream, Streams) ->
      StreamId = stream_id(Stream),
      WhichSet =
          case {StreamId rem 2, Streams#streams.type} of
              {0, client} ->
  