Currently, the standard init function is called before socket declaration, but the contextual init function is called after, which is problematic if the declaration depends on the initialization step. This patch moves the contextual init function to be called before declaration just like the standard init function. This is needed when moving the File Output node to use socket declaration. Pull Request: https://projects.blender.org/blender/blender/pulls/141203