save and restore arena index to prevent arena overflow.
Merge pull request #2582 from iij/pr-attr-accessor-save-arena

save and restore arena index to prevent arena overflow.