I tried it, however that introduces a bug. It does not reset the array as you would expect. Thus the next time you try to expand a snippet an exception is thrown because the array is filled with undefined elements from the last run. Setting the length to zero made it work as expected.