Skip hard deleted streams in projection linkto

Hi,
How can I prevent the following things in a projections:
a) A linkTo is done to a hard deleted stream (puts the projection in a faulted state at startup).
b) A linkTo is made for an event that is part of a hard deleted stream (I only want undeleted events in the stream created by the projection).

Scavenge has been run, but they are in the active chunk.

  fromAll()
.when({
    $any: function (state, ev) {
        if (ev
            && ev.eventType && !ev.eventType.startsWith('$')
            && ev.metadata && ev.metadata.tenant_code
            ) {
                linkTo(ev.metadata.tenant_code + '.TenantEvents', ev);
            }
        return null;
    }
});

Kind regards

Hi,
Is it really not possible, to skip these in a projection using fromAll?

Can’t it be done using $streamDeleted or stream metadata like in EventStore.ClientAPI StreamMetadataResult.IsStreamDeleted? Is there nothing similar in a user defined projection?

Kindly and anxiously waiting for a response