Fixed a few edge cases related to serializing IList<T> in NbtSerializationGen