Multiple exit loop handling in ivopts. Regression tested on x86-64/linux