Fix selection of first graphnode to execute in a function

1. Add a property to the graphnopde to determine if its immediate scope
is a function
2. Nested language testcase

@ke-yu
@lukechurch

If it is false, it means the graphnode can be in a function but is within a language block in that function. In which case it is owned by the language block