Support FUNCTION scope

Refer from inner to outer