diff --git a/compiler2/ttcn3/AST_ttcn3.cc b/compiler2/ttcn3/AST_ttcn3.cc
index 40fe36cf9862a6e424b42b850747f33dab7bc02c..9f4c539c2b8e8ef932dc36b60e5a93b19098da23 100644
--- a/compiler2/ttcn3/AST_ttcn3.cc
+++ b/compiler2/ttcn3/AST_ttcn3.cc
@@ -10270,6 +10270,7 @@ namespace Ttcn {
         pars_m.add(name, par);
         if (parent_scope && parent_scope->has_ass_withId(id)) {
           Reference ref(0, id.clone());
+          ref.set_my_scope(this);
           Common::Assignment *ass = parent_scope->get_ass_bySRef(&ref);
           if (!ass) FATAL_ERROR("FormalParList::chk()");
           if (parent_scope->get_scope_class() == NULL ||