[BUG] Fix issue 14 - script fail on strict due to indefined variable

In fact there is only a break missing causing the while loop to work on even if the target mage template classes are reached.