When the script was rerun from it's onComplete callback, this variable was not being reset and thus the loader would never reach the number of images it thinks it has to check.