ENG-6472, correct a wrong usage of WeakReference.