[MOD] Option WRITEBACK: only apply to main-memory documents. Fixes #786