PHP-977: Regression test for cursor iteration within generator
Merge pull request #755