Fix Resource::Prune segfaulting