Cavegen: fix division by 0 with abnormal max tunnel diameter sizes