fix Issue 9578 - "is a nested function and cannot be accessed from" problem