Raise AttributeError when setting a non-existent tag

It was possible to set a non-existent tag, which was then silently
ignored. Doing so will now raise an AttributeError.