The inner condition is needed if $OLD_SOURCE is removed partway through the loop. I suppose the outer condition is redundant.