The more I think about it, we should move this dereferencing into a class. It will make the resource decriptor class lighter and then you can test the class more fundamentally with hashes, etc.