Inter-thread comm permutations now use size of the work group.
Fix recalculation of tids in inter-thread comm.