Protect against divide by zero in CommDetector2.

Fixes coverity 746808.