Don't worry, it seems to take everyone (including me) at least a dozen or half-dozen attempts to get that template to do what they want. I was about to say, "blame it on the people who didn't install Extension:TemplateSandbox" and then I saw that it is installed. Hmm, is that tool useful for this type of situation? Unfortunately, it looks like a lot of work to operate; I think I would be tempted to just edit the live template. We have test.wikipedia.org; where's test.mediawiki.org when we need it?!
Still, I don't like the feeling of being under time pressure once I start editing those high-usage templates and something goes awry. I feel like I need to fix it really quickly to get it working again, but I'm in such a hurry that I find myself frantically saving one edit after another, trying to make it work but merely breaking it in a slightly different way each time. A sense of desperation begins to mount. I don't want to revert it completely back, though, because that would not only admit temporary defeat but also add yet another edit to the history. Yet I end up making a bunch of edits anyway.