Remove usage of markAsDirty.