- map<string, vector<FunctionDeclaration *> >::iterator i = functions.find(call.name);
- if(i!=functions.end())
- call.declaration = i->second.back();
+ map<string, FunctionDeclaration *>::iterator i = stage->functions.find(call.name);
+ if(i!=stage->functions.end())
+ call.declaration = i->second;