anchor.diff:  		  _ -> [{put_bits,Bitmap,NumBits,[1]}]
   	      end,
       B++[{call,per_common,extension_bitmap,[Val,Pos,Pos+NumBits],Bitmap},
  -	{'cond',[[{eq,Bitmap,0}],
  -		 ['_'|Length ++ PutBits]],{var,"Extensions"}}].
  +	{list,[{'cond',[[{eq,Bitmap,0}],
  +			['_'|Length ++ PutBits]]}],
  +	 {var,"Extensions"}}].
   
   per_enc_optional(Val0, {Pos,DefVals}, _Aligned) when is_integer(Pos),
   						     is_list(DefVals) ->
  
positive.code:     {[{'cond',Cs}],Al};
  enc_opt_al({error,_}=Imm, Al) ->
      {[Imm],Al};
  enc_opt_al({put_bits,V,N,[U,align]}, Al0) when Al0 rem 8 =:= 0 ->
      Al = if
  	     is_integer(N) -> N*U;
  
negative.code: 	 end,
      {lists:reverse(CAcc),Al}.
  
  enc_opt_hoist_align([{'cond',Cs0},{put_bits,0,0,[1,align]}]=Imm) ->
      try
  	Cs = [insert_align_last(C) || C <- Cs0],
  	[{'cond',Cs}]
      catch
  	throw:impossible ->
  	    Imm
      end;
  enc_opt_hoist_align(Imm) -> Imm.
  
  insert_align_last([_,{error,_}]=C) ->
      C;
  insert_align_last([H|T]) ->
      case lists:last(T) of
  	{put_bits,_,_,_} ->
  	    [H|T ++ [{put_bits,0,0,[1,align]}]];
  	_ ->
  	    throw(impossible)
      end.
  
  %%%
  %%% For the aligned PER format, fix up the intermediate format
  