Fix the "close before dup" bug in clone-pack too