ref-filter: bump 'used_atom' and related code to the top