This reverts commit 7cf5d63cd3.
7cf5d63cd3
This fixes incorrect reference counts causing database desync.