Fix session removal for resources not visible to Anonymous.