Profiling xrefs to work around issue #39.

These changes should be reversed when issue #39 is resolved.