That behaviour was desribed by the old masters as 'ex falso quodlibet': from falsity whatever (when else am i having the chance to be this pedantic). In the uni I was taught that hippie-era AI dealt with that with things called non-monotonic reasoning, abduction, truth maintenance systems.