In oracle version (acs-content-repository-procs-oracle.xql) it seems to be something in between 😊 :
select distinct crftd.path storage_area_key
from cr_files_to_delete crftd
where not exists (select 1
from cr_revisions r
where r.filename = crftd.path)
BTW, is your change just in HEAD or also in the 4-6 branch?