But maybe it's enough to just do what you did - if we get an MCELEM slot, can it ever contain anything else than array of elements of the attribute array type? I'd bet that'd cause all sorts of issues, no?
Thanks for the explanation of why it wasn't working for me. Knowing that the case of MCELEM + is-array-type is the only case where we'd need to do that puts me at ease.