Seems like `wasDirty` is unused?