mark only actually changing attributes as dirty

Changing value 'Foo' to 'Foo' should not mark attribute dirty.