Fixed another case of "too many SQL variables" error

When a tag already exists, the files of the old tag are re-assigned.
This causes another query that won't work on SQLite. Using
`chunked_bulk_create` fixes this.