After 763e5466c0, one doesn't need to set flags for different pieces of text. The flags now are something the client sets up once, depending on how it actually uses the buffer. As such, don't clear it in clear_contents(). Tests updated.
763e5466c0