title: Why can't two TBytes use overlapping data?
body: <p>Consider the following XE6 code.  The intention is that <code>ThingData</code> should be written to the console for both <code>Thing1</code> &amp; <code>Thing2</code>, but it is not.  Why is that?</p>
  
  <pre><code>program BytesFiddle;
  
  {$APPTYPE CONSOLE}
  
  {$R *.res}
  
  uses
    System.SysUtils;
  
  type
    TThing = class
    private
      FBuf : TBytes;
      FData : TBytes;
      function GetThingData: TBytes;
      function GetThingType: Byte;
    public
      property ThingType : Byte read GetThingType;
      property ThingData : TBytes read GetThingData;
  
      constructor CreateThing(const AThingType : Byte; const AThingData: TBytes);
    end;
  
  { TThing1 }
  
  constructor TThing.CreateThing(const AThingType : Byte; const AThingData: TBytes);
  begin
    SetLength(FBuf, Length(AThingData) + 1);
    FBuf[0] := AThingType;
    Move(AThingData[0], FBuf[1], Length(AThingData));
  
    FData := @FBuf[1];
    SetLength(FData, Length(FBuf) - 1);
  end;
  
  function TThing.GetThingData: TBytes;
  begin
    Result := FData;
  end;
  
  function TThing.GetThingType: Byte;
  begin
    Result := FBuf[0];
  end;
  
  var
    Thing1, Thing2 : TThing;
  
  begin
    try
      Thing1 := TThing.CreateThing(0, TEncoding.UTF8.GetBytes('Sneetch'));
      Thing2 := TThing.CreateThing(1, TEncoding.UTF8.GetBytes('Star Belly Sneetch'));
  
      Writeln(TEncoding.UTF8.GetString(Thing2.ThingData));
      Writeln(Format('Type %d', [Thing2.ThingType]));
  
      Writeln(TEncoding.UTF8.GetString(Thing1.ThingData));
      Writeln(Format('Type %d', [Thing1.ThingType]));
  
      ReadLn;
    except
      on E: Exception do
        Writeln(E.ClassName, ': ', E.Message);
    end;
  end.
  </code></pre>