Only mark as modified if actually modified.