Don't crash with a new, empty list field.
Don't crash deleting the last part in a layer.
Lee isn't going to accept SetBoolFirstChild into tinyxml2, so inline it into CTinyXMLUtils::AddBoolNamed, so it'll work with an unchanged tinyxml2.
Fix a retain circle between CConcreteObject and its mValueForScripts (which is a kLeoValueTypeScriptableObject). We should be creating references to scriptable object values in our scripts anyway, not direct values, so we're still safe from the object going away.
Add InitValue() to CScriptableObject, which allows asking an object to generate a proper value referring to it. Most values will create a reference to their mValueForScripts here, insulating you from cases where e.g. your script stashes away a reference to an object and then deletes the object (you'll get an error message, not a crash). Also changed all spots that were manually creating scriptable object values to go through this now.
Reminder to self of possible issue with message box's mValueForScripts. Can we just get rid of it? It's a singleton, after all.