A bunch of small fixes to new pinning handling. Passes the new opam-RT test.