Validate against duplicate entries within nested repeats

Hi everyone,

I have the following scenario:

I'm collecting data for a household, and each household can have a maximum
of say, 3 plots of land. And for each of these three, they can grow a
maximum of 2 crop types. So I want to collect data on crop yields for each
plot and it's important to prevent a situation whereby a user enters a
given crop more than once for a given plot, i.e, this is valid:

Plot A
Crop Maize

Plot A
Crop Beans

Plot B
Crop Maize

Plot B
Crop Beans

but not

Plot A
Crop Maize

Plot A
Crop Maize <--- duplication

To achieve this kind of data collection I am using nested repeats of
questions...can anyone advise on what kind of calculation/constraint would
help me achieve the above validation? It seems as though I'd need to use
loop logic to check through the values of the repeats and halt/flag on
encountering a repeat but I can't imagine how I'd do that with the XLSX
form?

Thanks in advance!

Hussein