[10.x] Fixes ShouldBeUnique
behavior for missing models
#50211
+213
−20
Closed