Fixed. Good lesson on the evils of global search + replace.