Because the option takes in a function as opposed to a name, you have to declare that function before it is used. Basically, just move the code for gpii.uiOptions.panels.arrayMergePolicy to the top of the file and things should work.