Fixed attribute inheritance bug.

Attributes assigned to instances of classes were being inherited by all instances of the class. Create temp versions of each tag to prevent this.