Minor scope tightening in writer.cpp.