Fix some tests where string were compared in-place, and add braces for debug trace after a conditional.