Eliminate recursive calls in UpcastDictionary

I realized I had tail-end recursion, which could be easily eliminated.
Because of yield return, I think this greatly simplified the code.