ENG-5880: Fix bad usage of weak references.
Merge pull request #1155 from VoltDB/ENG-5880-weakmap

ENG-5880: Fix bad usage of weak references.