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

Fixes gh-1321
Add public getter for dependency context
Merge branch '1.1.x'