Fix Issue 11957 - extern inside function scope ignored
Merge pull request #3130 from yebblies/issue11957

Issue 11957 - extern inside function scope ignored