Thanks for your bug report, I appreciate it. It is not clear to me what script command MyDefrag was executing when you experienced the loop. Was it the "ReclaimNtfsReservedAreas()" command at the end of your posting?
p.s. The "ReclaimNtfsReservedAreas()" command is very old. It works, but not very well and I am thinking about removing this command. Please use
"PlaceNtfsSystemFiles()" instead.