Bugfix for new allgather_packed_range

Also additional assertion, moved "magic number" to where it's used.