Fix broken test

Since elements are now dict's, this prevents arbitrary attribute
assignment.