fix copy&paste memory leak at CustomValidationPopup

Closes #893