Fix failing test in DatabaseSession.