Index: src/GenPoly/InstantiateGeneric.cc
===================================================================
--- src/GenPoly/InstantiateGeneric.cc	(revision 138e29ecafd7b7c16c01bc5bf07aa51231168aa0)
+++ src/GenPoly/InstantiateGeneric.cc	(revision 35cd219b623c29a73cc06498fd38845d6799afd4)
@@ -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 } );
+			}
 		}
 	};
