diff --git a/typo3/sysext/core/Classes/Utility/File/BasicFileUtility.php b/typo3/sysext/core/Classes/Utility/File/BasicFileUtility.php
index f7ce30bac6549f6e3d5d6c9cf9879d1414454a0a..e63b9a61fe640a099ccbd37b2671780b930beac4 100644
--- a/typo3/sysext/core/Classes/Utility/File/BasicFileUtility.php
+++ b/typo3/sysext/core/Classes/Utility/File/BasicFileUtility.php
@@ -173,7 +173,7 @@ class BasicFileUtility
             $theTempFileBody = preg_replace('/_[0-9][0-9]$/', '', $origFileInfo['filebody']);
             // This removes _xx if appended to the file
             $theOrigExt = $origFileInfo['realFileext'] ? '.' . $origFileInfo['realFileext'] : '';
-            for ($a = 1; $a < $this->maxNumber; $a++) {
+            for ($a = 1; $a <= $this->maxNumber + 1; $a++) {
                 if ($a <= $this->maxNumber) {
                     // First we try to append numbers
                     $insert = '_' . sprintf('%02d', $a);