Answer
Check whether the field on LU B that you're joining from is itself a Reference-type custom attribute pointing at LU A — if so, the value physically stored on LU B isn't the friendly display text (like a country name), it's the OBJID (ROWKEY) of the corresponding row in LU A. Querying LU A's view using that stored value as if it were the friendly value won't match anything meaningful and can produce exactly this kind of error; the query needs to filter LU A's view on OBJID instead, using the value actually stored on LU B. This applies whether you're building the read-only attribute's Select Statement or writing an equivalent CURSOR in a Custom Event.