Fix data attribute flattening with fixnum values.

The circular reference check is only necessary for hash attribute
values. Applying the check to other types breaks if they have the same
object ID. This can happen with fixnum values.