Minor cleanup in orphan handling