Check the serialized value instead of the changed hash

This works around an issue where, if a nested hash/array is modified
directly, those changes aren't recorded in the changed attribute
hash. This approach always serializes and then checks that the
serialized value is different from the blob attribute.