Revert "Refactor LazySafeGenerator"

This reverts commit d51e89c96b9c62db4e66a2d12f171b01493d4b64.
Fix iterate() on LazySafeGenerator