Add attribute prefix to attributes

Attribute prefix was not being added to attributes, causing an assertion
to fail when using the serialiser to create snapshots.