Okay, nevermind. There's just a grave error in the tutorial http://www.grymoire.com/Unix/Sed.html. t isn't defined to look at the last substitution, but at all substitutions since the last input line was read and since the last t or T command. Sorry for the noise.