fix for "assign to readonly property line 2055"

Hi Ian,

I've got a little nasty bug on iOS devices »assign to readonly property line 2055«. I'll tracked it down to the in-loop. It will loop to the length property and then call cleanUpContent() with the value 1 (number). This will be passed to afmid(element) where then »(element._afmid = _afmid++)« will be called. This will results in the assign to readonly exception.