Make the legacy template detection system not hit a false positive when
replacing a \$ with $.