This problem must be researched more because your solution is not universal (ASkinData may be Nil in some cases). Could you help me reproduce a problem? I can't receive an error in tests..
Unfortunately, at the moment I cannot produce a simpla reproduction script or program. Maybe I can do that later (although I don't think so). Perhaps someone else has the same problem and can help to solve it.