Flush changes before invalidate in memory mapping tests