Fix GH-11476: crash with count_demerits negative-size-param Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com> Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>