When When encountering a file with an issue the program iterates through available projects to try to find which project the file is part of.
As implemented, the last project in project list is selected.
Fix this with a proper test inside loop and exit on success.