The first time this method is called, we will call `releaseRef()` for a doc that we did not call `addRef()`.

Keeping track of the doc ourself assures that we keep references (and event listening) accurate.