Minor modification to the directive to check if the value has changed or not when we're checking if it's unique.