fixed issues with MergeArrayElements

Did some extensive testing of how MergeArrayElements works.  I got it to
now work correctly with LVLI Entries and INGR Effects.  Making it work
with these two subrecords should mean that it is working with all
subrecords, but further testing will be necessary to know this for
certain.