Details in [ENG-11324](https://linear.app/comm/issue/ENG-11324/repeated-restoration-fails#comment-3f8b368b).
This is not ideal in terms on performance, but on the other hand restored database API is not used a lot, only during restoring (migrations and reading content), so this shouldn't affect performance at all. Alternative requires more changes and could be complicated, probably not worth it.