Fix reference counting of nested bson objects