The problem is in "inc/html.php", in the "html_msgarea" function. Using array_unique doesn't work for this array.
I was able create a workaround, which is in my file attachment. I use "$MSGUNIQ" to keep track of unique values, and "$MSGRETURN" to build an array identical to "$MSG", but without any duplicates.