Avoid crashing for false positive path

The building process was crashing when a good path was found but not the one with the `component.json` file.