Quote any references to tag.id in raw sql