Fix overlay building when an locally pinned package has a root OPAM file

Partly fix #742