Snap for 6704881 from bc51e4a76fc8c45dff1e86ec8043aab6d5c2c29c to rvc-d1-release

Change-Id: Iee84e9d02e6b5c4852a9814244cbe34998817525
diff --git a/core/SystemStatus.h b/core/SystemStatus.h
index fe6c6c6..8d5d9ac 100644
--- a/core/SystemStatus.h
+++ b/core/SystemStatus.h
@@ -551,6 +551,9 @@
                     typeCount--;
                 }
             }
+            if (MAX_NETWORK_HANDLES == lastValidIndex) {
+                --lastValidIndex;
+            }
 
             if (MAX_NETWORK_HANDLES != deletedIndex) {
                 LOC_LOGD("deletedIndex:%u, lastValidIndex:%u, typeCount:%u",