Prevent newFromAttributeChanges() from creating no-op transactions

Previously it would generate transactions changing an attribute
from 'foo' to 'foo' if you asked it to.

Change-Id: Ie4f58b9ff60c5b945ac22154fedcf839692a1a51