Index: /trunk/src/VBox/VMM/VMMR0/GMMR0.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/GMMR0.cpp	(revision 31382)
+++ /trunk/src/VBox/VMM/VMMR0/GMMR0.cpp	(revision 31383)
@@ -3765,6 +3765,16 @@
                                 RTMemFree(pRec->aRegions[i].paHCPhysPageID);
 
+                        Assert(pRec->Core.Key == GCBaseAddr || pRec->enmGuestOS == VBOXOSFAMILY_Windows64);                        
+                        Assert(pRec->cRegions == pRecVM->cRegions);
+#ifdef VBOX_STRICT
+                        for (unsigned i = 0; i < pRecVM->cRegions; i++)
+                        {
+                            Assert(pRecVM->aRegions[i].GCRegionAddr == pRec->aRegions[i].GCRegionAddr);
+                            Assert(pRecVM->aRegions[i].cbRegion == pRec->aRegions[i].cbRegion);
+                        }
+#endif
+
                         /* Remove from the tree and free memory. */
-                        RTAvlGCPtrRemove(&pGMM->pGlobalSharedModuleTree, GCBaseAddr);
+                        RTAvlGCPtrRemove(&pGMM->pGlobalSharedModuleTree, pRec->Core.Key);
                         RTMemFree(pRec);
                     }
