[testlib] Drop override of assertItemsEqual method
The override is not compatible with underlying (standard) method because it
builds sets and rely on eid.
Closes #3641111.
[rewrite] Fix crash when the main variable doesn't appear in the snippet's vargraph
Also, the added test discover another bug once the first has been fixed
(erroneous argument given to .rewrite recursive call).
Closes #3661918