Improve `GammaTrace`; get rid of nested `ReplaceRepeated`