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

name to: IsProcedureOwned

What is the meaning of procIndex if IsProcedureOwned is false?