Use the AttributeSet instead of AttributeWithIndex.

In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the
internals of the AttributeSet to outside users, which isn't goodness.

Attempt to remove use of the AttributeWithIndex object. I'm not able to compile
dragonegg on my machine. Hoping this is correct.