fix Issue 11385 - XXX is a nested function and cannot be accessed from XXX
Merge pull request #2705 from 9rnsr/fix11385

Issue 11385 - XXX is a nested function and cannot be accessed from XXX