doom: fix bug where cache lines were being flushed before they were written to