It is a known issue that this will happen if any of the folders have spaces in the name. mojoPortal will not let you create folders with spaces in the name but if the folders get there some other way like by ftp it can cause this problem where it keeps showing the same folders recursively in the file dialog. It is not fixable so the only solution is to not use spaces in folder and file names for media files and folders. Spaces have to be escaped in urls so it makes cleaner urls also not using spaces.
Best,
Joe