Fixed bug where the redeclaration of a function and not the canonical decl was used for inferring fn-rgn-param substitutions from call statements.