make encode-plist play nice with nested plists