Hi, clachan
Your missing a Enter after your M99 in your code or you can use a % after the last line.
F1000
g90
G00 x20 y20
g00 x0 y0
m98 p1234 l50
m30
o1234
g01 x20
y20
x-20
y-20
z-20
x20
y20
x-20
y-20
z20
x0
y0
z0
m99
%
It's been repeating for me now, It's easy to leave a Enter/Blank line Below your M99 out of your Gcode.
Hope this Helps, Chip