Use the template_id instead of key in ScoreWriter.

8 jobs for !306 with fix-db in 11 minutes and 36 seconds (queued for 1 second)
latest merge request