NB: this is unsafe for cyclic concatenations.