change `dirtyAttributes.pushObject` to `dirtyAttributes.addObject`

This prevents the same attributes from appearing multiple times in the
`dirtyAttributes` array