anchor.diff:  /// have intended effect (i.e. is a readonly pointer and/or a defensive copy).
   let rec mkExprAddrOfExprAux g mustTakeAddress useReadonlyForGenericArrayAddress mut expr addrExprVal m =
       if mustTakeAddress then 
  +        let isNativePtr = 
  +            match addrExprVal with
  +            | Some vf -> valRefEq g vf g.addrof2_vref
  +            | _ -> false
  +
  +        // If we are taking the native address using "&&" to get a nativeptr, disallow if it's readonly.
  +        let checkTakeNativeAddress readonly =
  +            if isNativePtr && readonly then
  +                error(Error(FSComp.SR.tastValueMustBeMutable(), m))
  +
           match expr with 
           // LVALUE of "*x" where "x" is byref is just the byref itself
           | Expr.Op (TOp.LValueOp (LByrefGet, vref), _, [], m) when MustTakeAddressOfByrefGet g vref || CanTakeAddressOfByrefGet g vref mut -> 
  
positive.code:             let writeonly = false
              let shape = ILArrayShape.FromRank args.Length
              let ilInstrReadOnlyAnnotation = if isTyparTy g elemTy && useReadonlyForGenericArrayAddress then ReadonlyAddress else NormalAddress
              let isNativePtr = 
                  match addrExprVal with
                  | Some vf -> valRefEq g vf g.addrof2_vref
                  | _ -> false
              
              None, mkArrayElemAddress g (readonly, ilInstrReadOnlyAnnotation, isNativePtr, shape, elemTy, (aexpr :: args), m), readonly, writeonly
  
          // LVALUE: "&meth(args)" where meth has a byref or inref return. Includes "&span.[idx]".
  
negative.code:         | Expr.Val (vref, _, m) when MustTakeAddressOfVal g vref || CanTakeAddressOfImmutableVal g m vref mut ->
              let readonly = not (MustTakeAddressOfVal g vref)
              let writeonly = false
              checkTakeNativeAddress readonly
              None, mkValAddr m readonly vref, readonly, writeonly
  
          // LVALUE of "e.f" where "f" is an instance F# field or record field. 
  