Before when the overflow occurred an assertion as triggered. Now check
whether the maximum has been reached and warn properly.
This patch fixes the original submission of bug 19607. The part mentioned
in its 'duplicate' bug 33162 has not been fixed. I want to look at that
after this patch has been accepted.