Fix some more corner cases related to purging