Fix shallow effect expansion in writeback optimization.