Fix abo heap overflow
If the value indicating the number of ABOs is very large, the current tests were not sufficient to insure out-of-range array access, because the integer subtraction might overflow. Check the actual number of ABOs too to avoid this