Prevent the engine from optimizing get_document()/write_document() out.