Fix double hash lookup in BaseSqlTableModel.