Fixed #365 - incorrect behaviour from unique validation