Casting nested arrays when set; isset/empty support.

Trying to get the functionality of SvelteSets and Documents a little closer to the original Li entities. This fixed some minor issues I had getting the MLE code working with Svelte. I could have tweaked MLE to work around it, but I figured this might prevent a few other issues in migrating to Svelte.