Thanks for the bug report. Curiously, here are two workarounds.
One is to name the destructor of the Wrap2 constructor's first parameter:
datatype wrap2 = Wrap2(get: A.wrap);
and change the body of the function unwrap to just w.get.
The other is to import A as "opened":
import opened A;