Use head not lookup as the empty/singleton flag
Use head not lookup as the empty/singleton flag

Set head to -1 when the objects array is not yet allocated, and condition off that instead of the lookup array.

alicep-org/collect