[10.x] Fix CanBeOneOfMany
giving erroneous results
#47427
Merged
CanBeOneOfMany
giving erroneous results
#47427