Fix a bug that could prevent getting files from an importtree=yes remote, because the imported tree was allowed to be garbage collected.
Moved out an XXX to a todo This seems about ready to merge..