I have to admit that your test file did not work as expected, but after a few changes it worked better.
%
G21 G90 G54 G80
G52 X0 Y 0
F500
#1=-.1
#11=-.1 ( Z Step Depth )
#2=0
#3=20 ( Part Offset )
#4= 2 ( Number of Z steps)
#5= 3 ( Number of Parts on X axis )
#6=1 ( Parts Counter per setup)
G0X0Y0
M98 P2 L#5
G40
Z2.000
X0Y0
G52 X0 Y0
G0 X0Y0
T0 M6
M30
(% removed)
o02
T#6 M6
#1=-.1
Z2.000
G40 X0Y0
G52 X#2
G0 X0 Y0
#2=[#2+#3]
M98 P3 L#4
#6=[#6+1]
m99 (added this)
(% removed)
o03
G41 P.5
G1 X5 Y-1 Z#1
#1=[#1+#11]
G1 X5 Y5
X-5 Y5
X-5 Y-5
X5 Y-5
X5 Y-1.5 Z#1
Y-1
m99
%
Graham