Fix the compare view for annotations, since the resource names are returned in a different format.

Refactored out the code that finds a UUID from a resource name. It looks horribly fragile, but I'm not sure how to fix it.