diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index f3799361db069ea0201adf29b041ad2b0fb8e11a..f26549cc3d0f819a141c78967b3ffcf57b5b64ad 100644
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -1321,6 +1321,7 @@ void AISUpdate::parseCategory(const LLSD& category_map, S32 depth)
 
     if (curr_cat
         && curr_cat->getVersion() > LLViewerInventoryCategory::VERSION_UNKNOWN
+        && curr_cat->getDescendentCount() != LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN
         && version > LLViewerInventoryCategory::VERSION_UNKNOWN
         && version < curr_cat->getVersion())
     {
@@ -1429,15 +1430,26 @@ void AISUpdate::parseCategory(const LLSD& category_map, S32 depth)
 
 void AISUpdate::parseDescendentCount(const LLUUID& category_id, const LLSD& embedded)
 {
-	// We can only determine true descendent count if this contains all descendent types.
-	if (embedded.has("categories") &&
-		embedded.has("links") &&
-		embedded.has("items"))
-	{
-		mCatDescendentsKnown[category_id]  = embedded["categories"].size();
-		mCatDescendentsKnown[category_id] += embedded["links"].size();
-		mCatDescendentsKnown[category_id] += embedded["items"].size();
-	}
+    if (mType == AISAPI::FETCHCOF)
+    {
+        // contains only links
+        if (embedded.has("links"))
+        {
+            mCatDescendentsKnown[category_id] = embedded["links"].size();
+        }
+    }
+    else
+    {
+        // We can only determine true descendent count if this contains all descendent types.
+        if (embedded.has("categories") &&
+            embedded.has("links") &&
+            embedded.has("items"))
+        {
+            mCatDescendentsKnown[category_id] = embedded["categories"].size();
+            mCatDescendentsKnown[category_id] += embedded["links"].size();
+            mCatDescendentsKnown[category_id] += embedded["items"].size();
+        }
+    }
 }
 
 void AISUpdate::parseEmbedded(const LLSD& embedded, S32 depth)
diff --git a/indra/newview/llfloaterchangeitemthumbnail.cpp b/indra/newview/llfloaterchangeitemthumbnail.cpp
index d7fbf1384bb4dc2abe4633739c03aabd28a27ef6..692ef3b163741e808302fc50926a83f8b01658b8 100644
--- a/indra/newview/llfloaterchangeitemthumbnail.cpp
+++ b/indra/newview/llfloaterchangeitemthumbnail.cpp
@@ -546,12 +546,21 @@ struct ImageLoadedData
     LLUUID mThumbnailId;
     LLUUID mObjectId;
     LLHandle<LLFloater> mFloaterHandle;
+    bool mSilent;
 };
 
 void LLFloaterChangeItemThumbnail::assignAndValidateAsset(const LLUUID &asset_id, bool silent)
 {
     LLPointer<LLViewerFetchedTexture> texturep = LLViewerTextureManager::getFetchedTexture(asset_id);
-    if (texturep->getFullWidth() == 0 && !texturep->isFullyLoaded() && !texturep->isMissingAsset())
+    if (texturep->isMissingAsset())
+    {
+        LL_WARNS() << "Attempted to assign missing asset " << asset_id << LL_ENDL;
+        if (!silent)
+        {
+            LLNotificationsUtil::add("ThumbnailDimentionsLimit");
+        }
+    }
+    else if (texturep->getFullWidth() == 0)
     {
         if (silent)
         {
@@ -566,9 +575,10 @@ void LLFloaterChangeItemThumbnail::assignAndValidateAsset(const LLUUID &asset_id
         data->mObjectId = mItemId;
         data->mThumbnailId = asset_id;
         data->mFloaterHandle = getHandle();
+        data->mSilent = silent;
 
         texturep->setLoadedCallback(onImageLoaded,
-            MAX_DISCARD_LEVEL, // don't actually need max one, 3 or 4 should be enough
+            MAX_DISCARD_LEVEL, // Don't need full image, just size data
             FALSE,
             FALSE,
             (void*)data,
@@ -648,16 +658,20 @@ void LLFloaterChangeItemThumbnail::onImageLoaded(
         {
             setThumbnailId(data->mThumbnailId, data->mObjectId);
         }
+        else if (!data->mSilent)
+        {
+            // Should this only appear if floater is alive?
+            LLNotificationsUtil::add("ThumbnailDimentionsLimit");
+        }
+    }
 
-        // Update floater
-        if (!data->mFloaterHandle.isDead())
+    // Update floater
+    if (!data->mSilent && !data->mFloaterHandle.isDead())
+    {
+        LLFloaterChangeItemThumbnail* self = static_cast<LLFloaterChangeItemThumbnail*>(data->mFloaterHandle.get());
+        if (self && self->mExpectingAssetId == data->mThumbnailId)
         {
-            LLFloaterChangeItemThumbnail* self = static_cast<LLFloaterChangeItemThumbnail*>(data->mFloaterHandle.get());
-            if (self && self->mExpectingAssetId == data->mThumbnailId)
-            {
-                LLNotificationsUtil::add("ThumbnailDimentionsLimit");
-                self->mExpectingAssetId = LLUUID::null;
-            }
+            self->mExpectingAssetId = LLUUID::null;
         }
     }
 
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index 87dba5f100a581fc049927fe77b216cb31dfec08..0801b71e34b2249ab4929d36fb8694e183cfb716 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -2376,6 +2376,9 @@ void LLInventoryGalleryItem::setSelected(bool value)
 
 BOOL LLInventoryGalleryItem::handleMouseDown(S32 x, S32 y, MASK mask)
 {
+    // call changeItemSelection directly, before setFocus
+    // to avoid autoscroll from LLInventoryGallery::onFocusReceived()
+    mGallery->changeItemSelection(mUUID, false);
     setFocus(TRUE);
     mGallery->claimEditHandler();