Should fix issue #98

Not sure if this is sufficient. Tests pass. 

Besides, it's not totally clear to me why duplicate attributes have to be guarded. Why not let them overwrite each other and let the last one win? I guess to prevent duplicate attribute events with the same name. Maybe users could handle these themselves.