The original condition should be returned in addition to the new one since unit-test will otherwise fail:
the reason for that is that the unit-test checks two things:
1. selected instances
2. terminated

and no instance should be selected if we reached the max.
Though the previous fix ensures that we won’t kill the chosen instance - according to the unit-test we should not even choose it (strict approach).