title: selector returning different value despite custom equalityFn check returning true
body: <p>I have the following selector and effect</p>
  <pre><code>const filterValues = useSelector&lt;State, string[]&gt;(
      state =&gt; state.filters.filter(f =&gt; f.field === variableId).map(f =&gt; f.value),
      (left, right) =&gt; {
          return left.length === right.length &amp;&amp; left.every(l =&gt; right.includes(l));
      },
  );
  const [value, setValue] = useState&lt;SelectionRange&gt;({ start: null, end: null });
  useEffect(() =&gt; {
      const values = filterValues
              .filter(av =&gt; av).sort((v1, v2) =&gt; v1.localeCompare(v2));
          const newValue = {
              start: values[0] ?? null,
              end: values[1] ?? null,
          };
          setValue(newValue);
  }, [filterValues]);
  </code></pre>
  <p>the selector above initially returns an empty array, but a different one every time and I don't understand why because the equality function should guarantee it doesn't.</p>
  <p>That makes the effect trigger, sets the state, the selector runs again (normal) but returns another different empty array! causing the code to run in an endless cycle.
  Why is the selector returning a different array each time? what am I missing?
  I am using react-redux 7.2.2</p>