Prevent infinite loop on empty src folder
There was an issue when the source folder didn't contain any source files, in that case the list of source files/directories remained empty and the folder was subsequently rescanned, creating an infinite loop.
BUG: 420161