test: regression test for closing a closed database