diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp
index ff6806082c67f4c9405d50f8a95bb9ca0921a9e1..d54e1a93ea9ab6d2b66d45ed582b9d7a8d3a2ae4 100644
--- a/indra/llcommon/llfasttimer.cpp
+++ b/indra/llcommon/llfasttimer.cpp
@@ -128,13 +128,6 @@ class NamedTimerFactory : public LLSingleton<NamedTimerFactory>
 
 	LLFastTimer::NamedTimer& createNamedTimer(const std::string& name, LLFastTimer::FrameState* state)
 	{
-		timer_map_t::iterator found_it = mTimers.find(name);
-		if (found_it != mTimers.end())
-		{
-			llerrs << "Duplicate timer declaration for: " << name << llendl;
-			return *found_it->second;
-		}
-
 		LLFastTimer::NamedTimer* timer = new LLFastTimer::NamedTimer(name);
 		timer->setFrameState(state);
 		timer->setParent(mTimerRoot);
@@ -155,7 +148,7 @@ class NamedTimerFactory : public LLSingleton<NamedTimerFactory>
 
 	LLFastTimer::NamedTimer* getRootTimer() { return mTimerRoot; }
 
-	typedef std::map<std::string, LLFastTimer::NamedTimer*> timer_map_t;
+	typedef std::multimap<std::string, LLFastTimer::NamedTimer*> timer_map_t;
 	timer_map_t::iterator beginTimers() { return mTimers.begin(); }
 	timer_map_t::iterator endTimers() { return mTimers.end(); }
 	S32 timerCount() { return mTimers.size(); }
@@ -294,6 +287,7 @@ S32 LLFastTimer::NamedTimer::getDepth()
 	while(timerp)
 	{
 		depth++;
+		if (timerp->getParent() == timerp) break;
 		timerp = timerp->mParent;
 	}
 	return depth;
diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h
index e42e549df58c6579de25f0f271a1225da74a93fd..b3f7304664ca730782daa22ed8677fb981ba9dbd 100644
--- a/indra/llcommon/llfasttimer.h
+++ b/indra/llcommon/llfasttimer.h
@@ -145,6 +145,7 @@ class LL_COMMON_API LLFastTimer
 		DeclareTimer(const std::string& name);
 
 		NamedTimer& getNamedTimer() { return mTimer; }
+		const NamedTimer& getNamedTimer() const { return mTimer; }
 
 	private:
 		FrameState		mFrameState;
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 59bf70f4888ba24a7ee169cff2de7d27f92be654..4dfb93f1bca3359ace15787dc845598b2a710266 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -514,6 +514,7 @@ void LLFastTimerView::draw()
 			while(!is_child_of_hover_item && next_parent)
 			{
 				is_child_of_hover_item = (mHoverID == next_parent);
+				if (next_parent->getParent() == next_parent) break;
 				next_parent = next_parent->getParent();
 			}
 
@@ -781,6 +782,7 @@ void LLFastTimerView::draw()
 					while(!is_child_of_hover_item && next_parent)
 					{
 						is_child_of_hover_item = (mHoverID == next_parent);
+						if (next_parent->getParent() == next_parent) break;
 						next_parent = next_parent->getParent();
 					}