Index: src/GenPoly/InstantiateGeneric.cc
===================================================================
--- src/GenPoly/InstantiateGeneric.cc	(revision 064cb183b9208c8bfca799c4a606ff5dc1b1aa8d)
+++ src/GenPoly/InstantiateGeneric.cc	(revision eed5e4836672e941a1bbd849e2b596cbeadefabc)
@@ -122,5 +122,10 @@
 		/// Adds a value for a (key, typeList) pair to the current scope
 		void insert( Key *key, const std::list< TypeExpr* > &params, Value *value ) {
-			instantiations[ key ].push_back( Instantiation( TypeList( params ), value ) );
+			auto it = instantiations.findAt( instantiations.currentScope(), key );
+			if ( it == instantiations.end() ) {
+				instantiations.insert( key, ValueList{ Instantiation{ TypeList( params ), value } } );
+			} else {
+				it->second.push_back( Instantiation{ TypeList( params ), value } );
+			}
 		}
 	};
