Adding logging to demonstrate the problem. Must be due to combination of execution model of generators and returning an object reference.
This should be enough to explain the problem. Will need to look at the flow for generators. Keep in mind explanation should apply to test of both second and third context...