Try to avoid a whole bunch of divide by zeroes with the AI.

attempt to fix #2421