Refactor determination of whether the field has changed

The types know more about what is going on than the dirty module. Let's
ask them!