Stop scanning the PDT if we find an specific function when ScanPDT's endFunc parameter is set