Fix use-after free in ``list_richcompare_impl`` which can be invoked via some specifically tailored evil input.