Fix for when the watched directory changes during a directory scan.