PHP-1231: PHP crashed when using selectCollection inside a Generator

https://jira.mongodb.org/browse/PHP-1231
It's probably not necessary at all, but I simply didn't touch this code.