Data attribute flattening breaks with fixnum values

The new data attribute flattening fails when the attribute values of the data hash are identical fixnums (or other immutable objects, like symbols). This HAML:

```haml
%div{:data => {:x => 50, :y => 50}}
```

Should generate this:

```html
<div data-x='50' data-y='50'></div>
```

But it records the `50` value as seen, and then returns `nil` for the second result, giving:

```html
<div data-x='50'></div>
```

I think the circular reference check is only necessary for hash attribute values. Reversing the order of the type check with the seen check fixes this problem.