pack-objects: Fix segfault when object count is less than thread count