Fix ReferenceExtractor

The cross-project reference feature broke the ReferenceExtractor class;
this fixes it.