diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index e419d1aea5d9d834b2823f534ba0aaee85622df1..f0cff6e5cd34ea30eb8176bfe3afab65467375c8 100755
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -2086,6 +2086,7 @@ void LLVolume::resizePath(S32 length)
 {
 	mPathp->resizePath(length);
 	mVolumeFaces.clear();
+	setDirty();
 }
 
 void LLVolume::regen()
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index 3cd43678912768f955c7b4a135e3dec87837d72b..b64034b9450278c92996d07f5098f35d0143879c 100755
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -722,13 +722,17 @@ void LLVolumeImplFlexible::preRebuild()
 	if (!mUpdated)
 	{
 		LL_RECORD_BLOCK_TIME(FTM_FLEXI_PREBUILD);
-		doFlexibleRebuild();
+		doFlexibleRebuild(false);
 	}
 }
 
-void LLVolumeImplFlexible::doFlexibleRebuild()
+void LLVolumeImplFlexible::doFlexibleRebuild(bool rebuild_volume)
 {
 	LLVolume* volume = mVO->getVolume();
+	if(rebuild_volume)
+	{
+		volume->setDirty();
+	}
 	volume->regen();
 	
 	mUpdated = TRUE;
@@ -801,7 +805,7 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
 		volume->dirtySpatialGroup();
 		{
 			LL_RECORD_BLOCK_TIME(FTM_FLEXIBLE_REBUILD);
-			doFlexibleRebuild();
+			doFlexibleRebuild(volume->mVolumeChanged);
 		}
 		volume->genBBoxes(isVolumeGlobal());
 	}
diff --git a/indra/newview/llflexibleobject.h b/indra/newview/llflexibleobject.h
index beb281a90626e1e194a13a5bf1e3b9555b0fce1a..a00551df8e10b5357f79a89f19ac7de52a026af0 100755
--- a/indra/newview/llflexibleobject.h
+++ b/indra/newview/llflexibleobject.h
@@ -100,7 +100,7 @@ class LLVolumeImplFlexible : public LLVolumeInterface
 		const LLMatrix4& getWorldMatrix(LLXformMatrix* xform) const;
 		void updateRelativeXform(bool force_identity);
 		void doFlexibleUpdate(); // Called to update the simulation
-		void doFlexibleRebuild(); // Called to rebuild the geometry
+		void doFlexibleRebuild(bool rebuild_volume); // Called to rebuild the geometry
 		void preRebuild();
 
 		//void				setAttributes( LLFlexibleObjectData );
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index 6cf6028ae064d37adb2790e2ba3e6e4a9b9aef4d..2176ec9c9c05e68c6fd65d484babfb99e3e67a19 100755
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -589,13 +589,9 @@ void LLVOCacheEntry::updateParentBoundingInfo(const LLVOCacheEntry* child)
 //-------------------------------------------------------------------
 LLVOCacheGroup::~LLVOCacheGroup()
 {
-	for(S32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
+	if(mOcclusionState[LLViewerCamera::CAMERA_WORLD] & ACTIVE_OCCLUSION)
 	{
-		if(mOcclusionState[i] & ACTIVE_OCCLUSION)
-		{
-			((LLVOCachePartition*)mSpatialPartition)->removeOccluder(this);
-			break;
-		}
+		((LLVOCachePartition*)mSpatialPartition)->removeOccluder(this);
 	}
 }
 
@@ -979,7 +975,11 @@ void LLVOCachePartition::processOccluders(LLCamera* camera)
 			group->doOcclusion(camera, &shift);
 			group->clearOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION);
 		}
-	}	
+	}
+
+	//safe to clear mOccludedGroups here because only the world camera accesses it.
+	mOccludedGroups.clear();
+	sNeedsOcclusionCheck = FALSE;
 }
 
 void LLVOCachePartition::resetOccluders()