Fixed test failures on backends other than SQLite.