This reverts commit 0db4dc00. This commit makes a lot of tests fail due to reference counting errors. It's not worth it to debug because the reference counting scheme is due to change soon anyway.