Fix a bug which makes test generation results unpredictable.
Add a test to make sure IPO2 test generation is predictable.