Scan for a valid MANIFEST.MF instead of taking the first one

Fixes gh-1321