Fix bug with unions resulting in infinite recursion except for depthLimit. I came across this while manually testing the changes here in one of my repos - I think it was an unintended consequence of https://github.com/timqian/gql-generator/pull/44, and the test introduced in that PR still passes, so I think my small change here is likely ok?