Add an implementation to handle more general case for reverse interleave.