Function Definition support inside custom node

Fixes http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-3258