fixes for upgrade wizard, improved add/replace behaviour for imports (shared decks always added, upgrade imports always replacing)
fix for closing of collections, so that thread counter doesn't get negative