Alright well here is a similar bit of code that produces the exact same results.
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, System.ComponentModel, Borland.Vcl.StdCtrls, Borland.Vcl.ImgList;
type
TTiles = record...