Core: do not crash when trying to open a database already open by another instance of Outspline

Fixes #213