Restrict choices already selected from a repeat group

I need to restrict choices already selected from a repeat group exactly as described here: Restrict choices already selected from a repeat group
and here: Preventing duplicate entries in a repeat loop

The two solutions given are good but do not work on Kobocollect and Enketo when trying to add more than 2 instances of the repeat group. If you add 3 instances of the repeat group and try to send the form it throws an error. The error comes from the constraint being checked twice (once when the values are entered and once when the form has to be sent). The first time the constraint is met while the second time is not. How do I overcome this problem?

Thank you very much for your help.