Fix issue with object inlining and relations in json