Fixed the maximum callstack exceeded error for a large number of files to be packaged.