Improve inference for unique
with abstract eltypes
#36280
Merged
unique
with abstract eltypes
#36280