fixes #3712
Merge pull request #3731 from dotCMS/issue-3712-duplicate-var-message-not-clearing-when-adding-host-var

fixes #3712