Support empty lists for IN
Make sure cache works even if there are multiple entities referencing same table (i.e. inheritance)