Fix for re-using segment object data structure when re-using the segment object list

When re-using the segment object list, a new segment object was created
for any additional objects in the current segment, rather than re-using the
segment object from the previous segment containing that object.
This meant that if the data structure was repeated, it thought that the
number of values was zero.

Fixes issue #16.