If curl adds a number to not "clobber" the output and an error occurs during transfer, the remove on error logic would remove the *original* file name without the added number.
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s): https://access.redhat.com/security/cve/cve-2022-27778