Add a workaround for SQLite dialect issues