Partially revert #2922

This is causing a bug in 1.2 (see ocaml/opam#1831 and ocaml/opam#1834) and was working fine anyway.
Merge pull request #2982 from samoht/master

Partially revert #2922