Fix search in rid list with rid on multiple clusters
Merge pull request #1753 from Volune/fix_search_in_rid_list

WHERE @rid in [...] doesn't work with rids over multiple clusters