Fix MAGN-694: crash when create function node