Dispose the BuildReferenceMap destroying all internal state.
Internal use only. See BuildReferenceMap.