add `if (!isDict(dict) && dict.dict) { dict = dict.dict }` above with comment about which generator does it