[#2034] apply distinct after union